Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Lawrence Crowl <crowl@xxxxxxxxxx>
  • Subject: Re: [cxx-abi-dev] Mangling late-specified return types/decltype
  • From: Jason Merrill <jason@xxxxxxxxxx>
  • Date: Mon, 08 Sep 2008 17:49:18 -0400

Lawrence Crowl wrote:
On 9/5/08, Jason Merrill <jason@xxxxxxxxxx> wrote:
Consider

 template<class T, class U>
 auto add(T t, U u) -> decltype (t+u);

There is currently no way to mangle "t" in the ABI.  Currently I'm dealing
this by replacing "t" in the return type with *(T*)0, but that seems
inelegant (and unnecessarily long).

Are you suggesting the mangling of the template itself or of its instances?
For the latter, shouldn't we be using the regular mangling?

The mangling of specializations is basically the mangling of the template plus the template arguments. This is done to distinguish between instantiations of different templates that have the same function signature.

Jason