[Bug libstdc++/95832] std::vector<bool> specialization leading std::variant ctor treating it as int rather than bool
fiesh at zefix dot tv
gcc-bugzilla@gcc.gnu.org
Tue Jun 23 05:04:38 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95832
--- Comment #1 from fiesh at zefix dot tv ---
https://en.cppreference.com/w/cpp/utility/variant/variant says that
"If T_i is (possibly cv-qualified) bool, F(T_i) is only considered if
std::decay_t<T> (until C++20)std::remove_cvref_t<T> (since C++20) is also bool"
which would mean 0 is the correct return value. But I can't find anything like
this in
http://eel.is/c++draft/variant
More information about the Gcc-bugs
mailing list