[cxx-abi-dev] Mangling late-specified return types/decltype

Jason Merrill jason at redhat.com
Fri Oct 31 18:27:37 UTC 2008


Mark Mitchell wrote:
> Is the type of the expression sufficiently canonical?  For example, I
> worry that one compiler will decide the expression has type "typename
> A<T>::B" while another decides that the type is "int" because it
> resolves a dependent type, or "typename A<T>::C" (because there's a
> typedef equating "B" and "C"), or some such.

That doesn't seem likely to me; the compiler isn't allowed to resolve 
dependent types to another type early, that's what it means to be dependent.

> Or even things like
> determining that the type is "void ()(T[3])" vs. "void ()(T*)".

That seems like a more likely issue: does the compiler do type decay 
while parsing the template or at instantiation time?.  But I would 
expect this to be easily resolved.

I was initially worried about this sort of thing too, and started to 
enumerate which subset of expressions we want to optimize this way 
(non-type-dependent expressions, declarations, conversions, literals, 
new-expressions), but as I think about it I don't think it's actually 
likely to be a problem.

Jason



More information about the cxx-abi-dev mailing list