// PR c++/89381 // { dg-do compile { target c++11 } } template struct base { base() { } base(const base&) { } base(base&&) { } base& operator=(const base&) { return *this; } base& operator=(base&&) { return *this; } }; struct foo : base { using base::base; using base::operator=; }; //using workaround = decltype(foo{*static_cast(0)}); struct bar { bar& operator=(foo ve) { value = ve; return *this; } foo value; }; int main() { foo a; foo b{a}; }