Jonathan Wakely <redi at gcc dot> 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> ---

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; note: ‘G::G(const G&)’ is implicitly deleted because the default
definition would be ill-formed:
 G::G(const G &) = default;
 ^ error: use of deleted function ‘constexpr l::l(const l&)’ 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

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.

Reply via email to