[Bug libstdc++/80654] is_trivially_copy_constructible fails with compiler error with vector of uncopyable objects

ville.voutilainen at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Apr 1 23:31:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654

--- Comment #7 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
That's not a bug. You need to make the copy constructor of s conditionally
deleted depending on whether T is copyconstructible. Otherwise the trait will
result in true but the code will not compile due to an ill-formed definition of
the copy constructor of s, and you'll get the same answer on every C++
compiler.


More information about the Gcc-bugs mailing list