I have a constexpr implementation of niche/tombstone optimization that works with clang -std=c++26, but of course it might very well depend on some compiler specific behavior...
Hm for this specific case I think you may be right. The pointer tagging I was referring to is usually for when you also want to still access the live object at the same time as using the alignment bits for additional data, which I suppose isn't needed here.
View all comments
Show parent comment
3
u/jiixyj Aug 16 '26
Is there something else needed for this besides
std::is_within_lifetime, which is C++26?I have a
constexprimplementation of niche/tombstone optimization that works with clang-std=c++26, but of course it might very well depend on some compiler specific behavior...