[LLVMbugs] [Bug 8190] New: template template parameters containing parameter packs (variadic) not implemented entirely

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 20 06:28:26 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8190

           Summary: template template parameters containing parameter
                    packs (variadic) not implemented entirely
           Product: clang
           Version: 2.8
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: faisalv at yahoo.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The following is not implemented in Clang.

>From 14.3.3 (temp.arg.template) p3 (n3126)

3 A template-argument matches a template template-parameter (call it P) when
each of the template parameters in the template-parameter-list of the
template-argument’s corresponding class template or template alias (call it A)
matches the corresponding template parameter in the template-parameter-list of
P. When P’s templateparameter-list contains a template parameter pack (14.5.3),
the template parameter pack will match zero or more template parameters or
template parameter packs in the template-parameter-list of A with the same type
and form as the template parameter pack in P (ignoring whether those template
parameters are template parameter packs) 

[ Example:
template <class T> struct eval;
template <template <class, class...> class TT, class T1, class... Rest>
struct eval<TT<T1, Rest...>> { };
template <class T1> struct A;
template <class T1, class T2> struct B;
template <int N> struct C;
template <class T1, int N> struct D;
template <class T1, class T2, int N = 17> struct E;
eval<A<int>> eA; // OK: matches partial specialization of eval
eval<B<int, float>> eB; // OK: matches partial specialization of eval
eval<C<17>> eC; // error: C does not match TT in partial specialization
eval<D<int, 17>> eD; // error: D does not match TT in partial specialization
eval<E<int, float>> eE; // error: E does not match TT in partial specialization
]

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list