[libcxx-commits] [libcxx] [libc++] Re-introduce special support for narrowing conversions to bool in variant (PR #73121)
David Benjamin via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 29 14:52:41 PST 2023
davidben wrote:
> We'll just want to always enable the narrowing check for boolean.
Well, it's a little interesting because the bool special case isn't a narrowing check, but an exact match. That was because, prior to the language change half of p1957r2, a narrowing check on bool wasn't sufficient. But, in working around that, other things went wrong like with vector<bool>.
Now that the language change happened, that's no longer needed and the actual narrowing check suffices. The problem is just that, when the narrowing check is suppressed, the bool special case was a bit more load bearing.
It's all a mess.
https://github.com/llvm/llvm-project/pull/73121
More information about the libcxx-commits
mailing list