This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Invalid code in <limits>



mark@codesourcery.com said:
> Gaby's examples are trickier.  For example:
>   template <int I>
>   void f(S<I + 3 + 4>);
> is guaranteed by the ABI to be mangled as "I + 3 + 4", not with "I +
> 7". (The ISO standard explicitly says that these might or might not be
> the same template; the ABI says that they are not.) 

I did not know that...
But this seems awkward...

Does that mean that I can make different specializations or overloads
on S<I +3 + 4> and on S<I+7> ??

That would be really fun (I do not have any sueful application ATM 
but I'm sure we can come with one) if only it were portable, but the 
ISO decision somehow does not ensure that (fortunately or 
unfortunately).

This is the only reason I can see for such a feature...
Am I missing something obvious ???

I really need to try this !!!

--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]