At least GCC hasn't done this... I hope it's not too late for them to reconsider.
I have a personal C++26 implementation of optional that implements constexpr niche/tombstone optimizations, so it is at least possible. You need std::is_within_lifetime for constexpr support though.
View all comments
Show parent comment
3
u/jiixyj Aug 16 '26
At least GCC hasn't done this... I hope it's not too late for them to reconsider.
I have a personal C++26 implementation of
optionalthat implementsconstexprniche/tombstone optimizations, so it is at least possible. You needstd::is_within_lifetimeforconstexprsupport though.