Title
std::decay
Status
c++11
Section
[meta.trans.other]
Submitter
Jason Merrill

Created on 2009-08-07.00:00:00 last changed 161 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Add a note to decay in [meta.trans.other]:

[Note: This behavior is similar to the lvalue-to-rvalue (4.1), array-to-pointer (4.2), and function-to-pointer (4.3) conversions applied when an lvalue expression is used as an rvalue, but also strips cv-qualifiers from class types in order to more closely model by-value argument passing. — end note]

Date: 2010-10-21.18:28:33

[ 2010 Pittsburgh: Moved to Ready. ]

Date: 2009-08-09.00:00:00

[ 2009-08-09 Howard adds: ]

See the thread starting with c++std-lib-24568 for further discussion. And here is a convenience link to the original proposal. Also see the closely related issue 705.

Date: 2009-08-07.00:00:00

I notice that std::decay is specified to strip the cv-quals from anything but an array or pointer. This seems incorrect for values of class type, since class rvalues can have cv-qualified type ([basic.lval]/9).

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 19:00:35adminsetstatus: ready -> wp
2010-10-21 18:28:33adminsetmessages: + msg1066
2010-10-21 18:28:33adminsetmessages: + msg1065
2010-10-21 18:28:33adminsetmessages: + msg1064
2009-08-07 00:00:00admincreate