[Bug c++/56506] New: variadic class template specialization not selected as best match
mmehlich at semanticdesigns dot com
gcc-bugzilla@gcc.gnu.org
Sat Mar 2 03:04:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56506
Bug #: 56506
Summary: variadic class template specialization not selected as
best match
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: mmehlich@semanticdesigns.com
I'd expect the instantiation of X in the following code to resolve to
the partial specialization, but gcc 4.7.2 seems to instantiate the base
template (causing a compile-time name resolution error).
// Code:
template<typename ... T> struct X { };
template<typename ... T> struct Y { };
template<typename ... T> struct Z { };
template<typename ... T> struct X<Y<Z<T...>,T>...> {
typedef int type;
};
X<Y<Z<int,bool,char>,int>,
Y<Z<int,bool,char>,bool>,
Y<Z<int,bool,char>,char>>::type x;
// Detailed compiler version information:
gcc -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.7.2/configure
--enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions
--with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry
--enable-libstdcxx-debug --disable-build-poststage1-with-cxx --enabl
e-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.7.2 (GCC)
More information about the Gcc-bugs
mailing list