https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127627
--- Comment #6 from songb432 at gmail dot com --- (In reply to Jason Merrill from comment #5) > Hmm, GCC assumes that non-eligible special member functions could never be > chosen by overload resolution, but that is not the case here due to > difference in "explicit". And [over] doesn't consider "eligible", so it > looks like GCC is wrong. > > P0848 doesn't seem to consider differences in explicit, perhaps it should be > included in [class.special] "kind" so that GCC's assumption is valid. Should this be submitted to CWG? I prefer that GCC is correct. My sentiment is that, if you add `static_assert(__is_trivially_copyable(X<S>));`, then you'll see both Clang and GCC pass the assertion. But Clang just let the overload resolution choose the non-trivial overload, that's too aggressive. And if you change `X<S> x2 = x` to `X<S> x2(x)`, then Clang doesn't compile: calling a private constructor.
