This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [c++-concepts] requires expression semantics

On 07/10/2013 08:24 AM, Andrew Sutton wrote:
That's a good idea. I changed every existing use of can_convert to
can_convert_standard for the time being. That will preserve the
existing behavior, and we can determine which of the existing uses can
include user-defined conversions later.

Let's leave alone cases where we know the arguments are non-class types, and only build the CAST_EXPR if one of the types is a class. And you don't need is_reference_to_function_type anymore.

+// Returns a type that suitable to be used as an rvalue of type T.
+// Except for function types, this is the same as T. For function
+// types, this is an rvalue reference to T.

To be pedantic, describing it as an rvalue of type T isn't exactly right; the reason we need to do this for functions is that an rvalue reference to function produces an lvalue, whereas all other rvalue references produce xvalues.

Go ahead and apply the patch with those tweaks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]