You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's perhaps a little early to open an issue for this but since I'm already toying with GCC16, I was surprised to see that it now generates a memset to zero init even when default_init is used.
I'm not yet sure if this is a compiler regression, an issue with the containers, a skill issue or something else. Again, happy to close it if it's too soon. :)
Activity
igaztanaga commentedon Jun 4, 2026
Could this be related to C++26's "erroneous-value initialization" implementation (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114457) ?
igaztanaga commentedon Jun 4, 2026
Maybe you can avoid the compiler-inserted memset with the "[[indeterminate]]" (https://en.cppreference.com/cpp/language/attributes/indeterminate) attribute:
boost::container::small_vector<float,100> bar [[indeterminate]] (100, boost::container::default_init);
or use the compiler flag to override the default behaviour for C++26
-ftrivial-auto-var-init=uninitialized
igaztanaga commentedon Oct 14, 2026
I've confirmed is related to C++26 erroneous behaviour, I'll updated the documentation with the explanation.