On 26. Jul 2017, at 15:07, Viktor Sehr
wrote: Thanks for your critique, as I see boost::markable is exactly what I was intended as it is a little bit more generalized.
Regarding the throwing, I intended the throw when assigned the mark value to be an "equivalent" to a assert, as I imagined the intention of assigning an uninitalized value is more clear if forced to used "val = {}" or "val.reset();", meaning it would be more of a drop-in replacement for boost::optional.
For what it's worth, I don't understand the critique in this thread. I thought that boost::markable was a neat idea and since people already use special integer values to indicate errors already, see std::string::npos, why not make a nice template for this use case that makes this (mis)use of special integer values more obvious and less error prone.