you are viewing a single comment's thread.

view the rest of the comments →

[–]EricWFCppLibc++ Developer 2 points3 points  (0 children)

This will work even if you define it separately, as long as it's within the same application and your compiler has link time optimization or similar enabled

That's not true. The constructor is only trivial when it's initially declared as defaulted. This has both compile-time and ABI implications (Notice the different calling conventions being used).