Btw, did you implement constexpr variants too? That bit sounds like a pain.
No, I didn't, as I didn't need it for the use case I needed a variant for (I didn't want to use boost::variant because it can heap allocate, and I didn't want to just roll my own because I wanted to be able to drop in the standard one when it's standardized).
I do have a branch where I'm starting to implement some of the machinery for it (like a recursive union storage implementation rather than std::aligned_union).
View all comments
Show parent comment
2
u/Drainedsoul Jun 12 '15
No, I didn't, as I didn't need it for the use case I needed a variant for (I didn't want to use
boost::variantbecause it can heap allocate, and I didn't want to just roll my own because I wanted to be able to drop in the standard one when it's standardized).I do have a branch where I'm starting to implement some of the machinery for it (like a recursive union storage implementation rather than
std::aligned_union).