https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69348
Bug ID: 69348
Summary: alias declarations can not be used inside qualifiers
of declarators
Product: gcc
Version: 5.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vanyacpp at gmail dot com
Target Milestone: ---
GCC shows error on this code. The code works correctly on clang and MSVC.
template <class T>
struct X {
int foo();
};
template <class T>
using foo2 = X<T>;
template <class T>
int foo2<T>::foo()
{
}
error: invalid use of incomplete type 'struct X<T>'