https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85517
Matt Calabrese <metaprogrammingtheworld at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |metaprogrammingtheworld@gma | |il.com --- Comment #2 from Matt Calabrese <metaprogrammingtheworld at gmail dot com> --- Example copy-assign non-compliance: ////////// #include <variant> struct bar { bar() noexcept = default; bar(bar&&) { /*never throws, but not noexcept*/ } bar(bar const&) // A copy constructor that throws. { throw 0; } bar& operator=(bar&&) noexcept = default; bar& operator=(bar const&) noexcept = default; }; int main() { std::variant<int, bar> v1, v2 = bar(); try { v1 = v2; } catch( int ) { return 0; } return 1; }