On Thu, Feb 2, 2012 at 11:34 PM, Douglas Gregor <[email protected]> wrote:
> Author: dgregor > Date: Fri Feb 3 01:34:46 2012 > New Revision: 149685 > > URL: http://llvm.org/viewvc/llvm-project?rev=149685&view=rev > Log: > Implement support for a pack expansion into a fixed-length > template. Such pack expansions can easily fail at template > instantiation time, if the expanded parameter packs are of the wrong > length. Fixes <rdar://problem/10040867>, PR9021, and the example that > came up today at Going Native. > Awesome! I note we now accept: template<typename,typename,typename> struct S {}; template<typename T, typename U> using U = S<T, int, U>; template<typename...Ts> int f(U<Ts...>, Ts...); int k = f({}, 0, 0); ... which should probably be considered invalid (see the thread on the core reflector starting with message 20878). [Incidentally, we mangle that as _Z1fIJiiEEi1SIDpT_iT0_ES2_ which looks like template<typename ...Ts = {int,int}> int f(S<Ts..., int, U>, Ts...); (where U is a nonexistent second template parameter). I've not been able to trigger a mangling like that without using one of these non-substitutable alias templates.]
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
