[cxx-abi-dev] Decltype mangling and type dependency

John Spicer jhs at edg.com
Wed Feb 23 01:44:11 UTC 2011


On Feb 22, 2011, at 8:28 PM, Jason Merrill wrote:

> It occurs to me now that this is really a language question, not ABI. Is this testcase well-formed?
> 
> template<class T, T* u>
> struct S
> {
>  decltype(u) foo(T);
> };
> 
> template<class T, T *u>
> T* S<T, u>::foo(T)
> {
>  T t;
>  return t;
> }
> 
> Type matching rules aren't well specified in the WP, but it seems reasonable to say that the definition needs to use decltype as well, which matches the decision to mangle decltype(u) in the signature.
> 
> 

Agreed.

I don't see any benefit in supporting inconsistent programming practices such as this.

John.





More information about the cxx-abi-dev mailing list