[cxx-abi-dev] Handling of cast operators in the mangling ABI

Mark Mitchell mark at codesourcery.com
Mon Nov 24 07:17:30 UTC 2003


> I think this needs to be spelled out more clearly in the mangling ABI.
> It's true that the ABI mentions the use of template parameters in
> parameter/result types, and it's true that the return type of operator
> A<A>() is in fact A.  But I think that the fact that a forward
> reference is required here, and the fact that it only applies to the
> cast operator, merits a special mention in the ABI document itself.
> 
> I recommend adding sentences along the lines of ``The instantiation of
> a templated conversion operator may use a template parameter number in
> the <type> which appears in the <operator-name>.  This parameter
> number refers to the template arguments for the templated conversion
> operator itself.  Note that this is a forward reference in the mangled
> name, as the template arguments will appear after the
> <operator-name>.''

I don't think there's anything special about a conversion operator.

If you had another member template function with a return value that was
a template parameter to the function, you would see the same behavior.

If you want to prepare a patch to the HTML document (using the
non-normative note formatting that is used elsewhere), we can see if
people want to apply it.  (I would certainly be in favor.)

-- 
Mark Mitchell <mark at codesourcery.com>
CodeSourcery, LLC




More information about the cxx-abi-dev mailing list