Where to implement __is_convertible_to?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Where to implement __is_convertible_to?

Steven Watanabe
AMDG

  VC++ has an intrinsic __is_convertible_to.  I've started
implementing it, but here's the problem:  The existing
type traits are implemented in ExprCXX.cpp, and are
passed an ASTContext only.  However, the only way that
I see to implement this trait (using InitializationSequence)
requires a Sema which is not available in the places where
EvaluateTrait is called from.  Any ideas?

In Christ,
Steven Watanabe

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Where to implement __is_convertible_to?

Sebastian Redl

On Sep 6, 2010, at 8:28 PM, Steven Watanabe wrote:

> AMDG
>
>  VC++ has an intrinsic __is_convertible_to.  I've started
> implementing it, but here's the problem:  The existing
> type traits are implemented in ExprCXX.cpp, and are
> passed an ASTContext only.  However, the only way that
> I see to implement this trait (using InitializationSequence)
> requires a Sema which is not available in the places where
> EvaluateTrait is called from.  Any ideas?

Only place I can see where this is possible is when creating the AST node.

Sebastian
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev