Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported declaration of std::exception follows non-exported declaration #4350

Closed
AndreyG opened this issue Jan 30, 2024 · 2 comments · Fixed by #4375
Closed

Exported declaration of std::exception follows non-exported declaration #4350

AndreyG opened this issue Jan 30, 2024 · 2 comments · Fixed by #4375
Labels
bug Something isn't working fixed Something works now, yay! modules C++23 modules, C++20 header units

Comments

@AndreyG
Copy link

AndreyG commented Jan 30, 2024

In the header <exception> firstly <vcruntime_exception.h> is included and then class exception is redeclared as exported. This is incorrect by the standard (https://eel.is/c++draft/module.interface#6), namely it repeats https://eel.is/c++draft/module.interface#example-4, where struct S is replaced with class exception.

@StephanTLavavej StephanTLavavej added bug Something isn't working modules C++23 modules, C++20 header units labels Jan 31, 2024
@StephanTLavavej
Copy link
Member

Reported internal compiler bug VSO-1953157 "Modules: MSVC should emit an error when an exported declaration follows a non-exported declaration".

@StephanTLavavej
Copy link
Member

Thanks again for reporting this bug - fixing it was surprisingly involved but it's going to significantly improve and simplify our code! 😻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Something works now, yay! modules C++23 modules, C++20 header units
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants