28 Sep
2015
28 Sep
'15
2:52 a.m.
Matt, I think the use case you describe is more suited to the easily-specializable optional I described in the other thread (although I do prefer the interface described by Agustín K-ballo Bergé, I will have to look into this some more). You have a type that can always have a special compressed optional representation. I believe that compact_optional's use case is that in this particular case, the value of "17" is not valid and is being used as a sentinel, but it's nothing intrinsic to the type, it has to do with the usage of type.