https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84782
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-03-12 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Reduced: struct c { static constexpr bool value = false; }; template <typename a> a declval(); template <typename g, typename = decltype(declval<g>() = 1)> // #1 void h(int); template <typename> c h(...); template<typename T> using i = decltype(h<T>(0)); struct k { k(const k &) = default; void operator=(k &&) = delete; }; struct l : k { using k::operator=; // #2 }; struct G { G(const G &); l q; }; int j = i<G>::value; G::G(const G &) = default; x.cc:28:1: note: ‘G::G(const G&)’ is implicitly deleted because the default definition would be ill-formed: G::G(const G &) = default; ^ x.cc:28:1: error: use of deleted function ‘constexpr l::l(const l&)’ x.cc:17:7: note: ‘constexpr l::l(const l&)’ is implicitly declared as deleted because ‘l’ declares a move constructor or move assignment operator class l : k { ^ The error is malformed for a start, we issue a note that doesn't follow any error. There seem to be two things involved here. The error is apparently triggered by the SFINAE check at #1 which should silently fail instead of giving an error. It seems to be an error because of the "using k::operator=;" line at #2 which should have no effect.