[cxx-abi-dev] Mangling of variadic arguments to alias template

Gabriel Dos Reis gdr at integrable-solutions.net
Tue Dec 13 19:29:24 UTC 2011


On Mon, Dec 12, 2011 at 10:05 PM, Jason Merrill <jason at redhat.com> wrote:
> In most cases, an alias template is transparent; when it's used in a
> template we can just substitute in the dependent template arguments.  So it
> seems to make sense for it to be transparent to mangling as well. But this
> doesn't work if the template-id uses a pack expansion for non-variadic
> parameters.  i.e.

What happens when the template alias name is used as a template
argument? Isn't the
template name mangled too like any other template name?

>
> template<class T, class U, class V>
> struct S {};
>
> template<class T, class V>
> using A = S<T, int, V>;
>
> template<class... Ts>
> void foo(A<Ts...>);
>
> There is no way to express A<Ts...> in terms of S; we need to wait until we
> have the argument pack before we can assign individual arguments to
> parameters.
>
> So what do we want to do about this?  Mangle alias-templates only in this
> situation?
>
> Jason
> _______________________________________________
> cxx-abi-dev mailing list
> cxx-abi-dev at codesourcery.com
> http://sourcerytools.com/cgi-bin/mailman/listinfo/cxx-abi-dev



More information about the cxx-abi-dev mailing list