This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Invalid code in <limits>
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Phil Edwards <phil at jaj dot com>, Gabriel Dos Reis <gdr at integrable-solutions dot net>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "rth at redhat dot com" <rth at redhat dot com>
- Date: Wed, 29 Jan 2003 21:04:13 +0100
- Subject: 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
--------------------------------------------------------------------