 |
|
|
|
Actions
|
|
[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [cxx-abi-dev] Mangling late-specified return types/decltype
- To: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
- Subject: Re: [cxx-abi-dev] Mangling late-specified return types/decltype
- From: Jason Merrill <jason@xxxxxxxxxx>
- Date: Fri, 31 Oct 2008 14:27:37 -0400
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
|
|