Skip to content
Discussion options

You must be logged in to vote

The great news is that C++26 does not bring risks binary security and actually makes it easier to keep the binary secure. In Glaze's C++23 implementation we had to make sure to instantiate a second static string that is just the portion of the source location so that the compiler would optimize away source information that would both bloat the binary and potentially leak some context (albeit minimal). With C++26 reflection we don't have to use source location hacks to get field metadata, which means that we only embed the reflection field names that are actually needed.

You can see a simple example of this on compiler explorer:
https://gcc.godbolt.org/z/KnsYe9nvf

Here's the JSON writing c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by stephenberry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2424 on April 02, 2026 02:29.