C++0x expression taxonomy

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

C++0x expression taxonomy

Sebastian Redl
Hi,

C++0x introduces a new taxonomy for expressions. We've got lvalues,
xvalues and prvalues, and their groupings glvalues and rvalues. These
are mostly relevant for reference binding, but that also includes casts.
I wonder, would it be better to try to integrate classification with the
current Expr::isLvalue function (e.g. extend the LV_Result enum with
LV_XValue), or should I write a separate function for that?

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

Re: C++0x expression taxonomy

Douglas Gregor

On Jun 19, 2010, at 8:04 AM, Sebastian Redl wrote:
> C++0x introduces a new taxonomy for expressions. We've got lvalues,
> xvalues and prvalues, and their groupings glvalues and rvalues. These
> are mostly relevant for reference binding, but that also includes casts.
> I wonder, would it be better to try to integrate classification with the
> current Expr::isLvalue function (e.g. extend the LV_Result enum with
> LV_XValue), or should I write a separate function for that?


I would start with a separate classification function (whose results are probably a superset of those of isLvalue), and we'll gradually move isLvalue callers over to that new classification function.

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