On Fri, Apr 12, 2019 at 9:40 PM degski via Boost
On Sat, 13 Apr 2019 at 00:47, Vinnie Falco via Boost <
boost@lists.boost.org>
wrote:
If I want/need a variant that offers the never-empty basic guarantee then Boost should not provide it?
Andrzej argues (in the other post) that you *shouldn't want* it, becoz it masks UB [result of programmer error] and will now cause havoc elsewhere in the program.
The basic guarantee prevents UB, doesn't mask it. Perhaps you mean to say "masks bugs", or at least that's how I read Andrzej's opinion. This may be so, but I fail to see why the argument against the basic guarantee in variant2 assignment does not apply in general. It would help me (and perhaps others) understand this argument if someone explains why is the basic guarantee appropriate in, say, the std::vector<T>::op=, but not in variant.