r/cpp • • Jun 18 '26

GCC 17 Lands Initial Infrastructure For C++29

https://www.phoronix.com/news/GCC-17-std-CPP29-Experimental
130 Upvotes

38 comments sorted by

View all comments

Show parent comment

3

u/Expert-Map-1126 vcpkg maintainer BillyONeal Jun 18 '26

I was under the impression that that .obj would also contain non-dependent inline functions which might have `std::string` in their interfaces, which depends on `_IDL`.

3

u/not_a_novel_account cmake dev Jun 18 '26 edited Jun 18 '26

Those get serialized into the BMI, call sites incorporate them into their own object files as COMDAT/vague-linkage symbols, same as headers.

The only reason module interfaces must always produce object files is dynamic initialization of statics, because the standard says that module interfaces are translation units ([basic.link]), and the statics from those TUs are initialized in interface dependency order ([basic.start.dynamic]).

Now I'm overstating the case because don't know if the first sentence is true for MSVC's implementation, but it's true for LLVM and GCC, and the IFC spec seems to imply it's the case for MSVC.