r/cpp • • Sep 09 '26

C++26: Module improvements

https://www.sandordargo.com/blog/2026/09/09/cpp26-modules
113 Upvotes

25 comments sorted by

View all comments

Show parent comment

1

u/Nobody_1707 Sep 11 '26

I'm fairly certain import statements were never allowed to be generated by a macro expansion even in C++20.

3

u/not_a_novel_account cmake dev Sep 11 '26

import within a preprocessor conditional, and the nominated name itself being an expansion, has always and continues to be valid C++.