http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53858
Bug #: 53858 Summary: template aliases used in template parameters default expression Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: leo...@volnitsky.com gcc-4.8 compile error when template aliases used in template parameters default expression. There was no error with gcc-4.7.1 --------------------------------------------------------------- template <typename T> struct s0 { typedef T tdef0; }; template <typename T> struct s1 { typedef T tdef1; }; template <typename T> using us1 = typename s1<T>::tdef1; template <typename T, typename TT = typename us1<T>::tdef0> struct s2 {}; int main () { return 0; } ------------------------------------------------------------------ g++ -std=gnu++11 t.cc t.cc:4:49: error: expected nested-name-specifier template <typename T, typename TT = typename us1<T>::tdef0> struct s2 {}; ^ t.cc:4:49: error: expected ‘>’ gcc -v Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0-pre9999/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0-pre9999/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.8.0_pre9999/work/gcc-4.8.0-9999/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0-pre9999 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0-pre9999/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-pre9999 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-pre9999/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-pre9999/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0-pre9999/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --with-ppl --with-cloog --disable-ppl-version-check --with-cloog-include=/usr/include/cloog-ppl --enable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --with-multilib-list=m32,m64 --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-pre9999/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,go,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.0_pre9999' Thread model: posix gcc version 4.8.0-pre9999 20120704 (experimental) commit 3d02dd733723c41be7c56f814a3072cee1b43ecc (Gentoo 4.8.0_pre9999) -------------------------------------------------------------------