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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |5.5.0
           Keywords|diagnostic, needs-reduction |
   Last reconfirmed|                            |2019-02-18
                 CC|                            |jason at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|Implicit copy constructor   |[7/8/9 Regression] Implicit
                   |cannot be generated after   |copy constructor cannot be
                   |unrelated class definition  |generated after unrelated
                   |                            |class definition
      Known to fail|                            |6.4.0, 7.3.0, 8.2.0, 9.0

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:

template<typename T>
struct base
{
  base() { }
  base(const base&) { }
  base(base&&) { }
  base& operator=(const base&) { return *this; }
  base& operator=(base&&) { return *this; }
};

struct foo : base<int>
{
    using base<int>::base;
    using base<int>::operator=;
};

//using workaround = decltype(foo{*static_cast<foo const*>(0)});

struct bar
{
    bar& operator=(foo ve)
    {
        value = ve;
        return *this;
    }

    foo value;
};

int main()
{
    foo a;
    foo b{a};
}


Regressed with r235002

            PR c++/70528

            * class.c (type_has_constexpr_default_constructor): Return true
            for an implicitly declared constructor.

Reply via email to