public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56506] New: variadic class template specialization not selected as best match
@ 2013-03-02  3:04 mmehlich at semanticdesigns dot com
  2013-03-02 18:55 ` [Bug c++/56506] " mmehlich at semanticdesigns dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: mmehlich at semanticdesigns dot com @ 2013-03-02  3:04 UTC (permalink / raw)
  To: gcc-bugs


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)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-04  6:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-02  3:04 [Bug c++/56506] New: variadic class template specialization not selected as best match mmehlich at semanticdesigns dot com
2013-03-02 18:55 ` [Bug c++/56506] " mmehlich at semanticdesigns dot com
2013-03-03 19:47 ` daniel.kruegler at googlemail dot com
2013-03-04 17:00 ` mmehlich at semanticdesigns dot com
2013-03-05 20:18 ` daniel.kruegler at googlemail dot com
2024-04-04  6:41 ` pinskia at gcc dot gnu.org
2024-04-04  6:41 ` pinskia at gcc dot gnu.org
2024-04-04  6:44 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).