On 16/05/2017 09:42, Niall Douglas via Boost wrote:
I can already tell that some people will want me to make the assignment of the default actions customisable by policy class such that empty is not treated so seriously. The good news is that that is very easy to do for any end user (simply write a new policy class and go), but I have chosen to not document it in the docs. If reviewers feel that documenting how to make arbitrary custom editions of basic_monad (soon to become basic_outcome) is important and to be encouraged, I can do that.
Presumably people who want an empty state to not be treated as error-like could simply use boost::optional<X> for T. Although technically I suppose that's a different kind of empty state than the one you're talking about, but I suspect it's what people are really wanting when they say that. I don't know if it would be worthwhile to try to optimise storage for that case.