5 Jun
2017
5 Jun
'17
11:15 p.m.
On 2/06/2017 22:23, Niall Douglas wrote:
Hopefully now explained above. Would you prefer a std::terminate on accessing empty instead? I'm strongly leaning towards that now we'll have split empty-capable vs non-empty-capable types, indeed I just logged that to https://github.com/ned14/boost.outcome/issues/54.
If a non-empty-capable type gets into a state where it can't be anything but empty, then a std::terminate seems justified. Otherwise I'm dubious -- if you're explicitly using an empty-capable type, then is empty really a serious error any more? But then, as I've said before, I'm biased against std::terminate in general, so perhaps I'm not the best one to ask.