https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86646
Bug ID: 86646 Summary: Special member function 'cannot be defaulted' if type alias is used Product: gcc Version: 7.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: programmer at posteo dot de Target Milestone: --- GCC 7.3.0 (as well as 8.1 and 9.0 from godbolt.org) fails to compile the following code: //--- template<int N_> struct Foo { static constexpr int N = N_;// this indirection causes the error using Self = Foo<N>; Foo(const Self&) = default; }; //--- The error message reads > file.cpp:6:22: error: ‘Foo<N_>::Foo(const Self&)’ cannot be defaulted I used the following command line to obtain that error message: > g++ -Wall -Wextra -std=c++11 file.cpp