30 May
2017
30 May
'17
12:57 a.m.
Gavin Lambert wrote:
FWIW, my preferred options would be (which I think were the originals):
- value() throws if holding error or exception (or empty)
- error() returns E{} if holding value or E{errc::has_exception} if holding exception, or E{errc::no_value} if empty (names made up on the spot, doesn't matter)
- exception() returns nullptr if holding value or error or empty
I like these as well.