[cxx-abi-dev] Magical type trait operators

Jason Merrill jason at redhat.com
Fri May 7 02:23:17 UTC 2010


On 05/06/2010 04:32 PM, David Vandevoorde wrote:
> The C++0x standard library has metaprogramming facilities (like the std::is_convertible) that require "magical" support from the compiler.  The principal implementations seem to have converged on nearly-identical "operators" for this.  E.g., std::is_convertible is typically implemented with an operator __is_convertible_to(T, U).
>
> Now, I _think_ that if code is written only in terms of the standard templates, the operator invocations won't appear in ABI signatures, but I'd like confirmation of that.

That is correct; the signatures show the standard library types.

> Even so, would it be worthwhile to specify what the magical operators are, and how they are mangled?

That seems to me to be an unnecessary constraint on implementors. 
Currently G++ just refuses to mangle these operators.

Jason



More information about the cxx-abi-dev mailing list