Created on 2008-09-10.00:00:00 last changed 162 months ago
Proposed resolution:
Change [func.ret], p1:
... The values ti are lvalues when the corresponding type Ti is an lvalue-reference type, and rvalues otherwise.
[ Post Summit: ]
Recommend Tentatively Ready.
The WP and TR1 have the same text regarding the argument types of a result_of expression:
The values ti are lvalues when the corresponding type Ti is a reference type, and rvalues otherwise.
I read this to mean that this compiles:
typedef int (*func)(int&); result_of<func(int&&)>::type i = 0;
even though this doesn't:
int f(int&); f( std::move(0) );
Should the text be updated to say "when Ti is an lvalue-reference type" or am I missing something?
I later came up with this self-contained example which won't compile, but I think it should:
struct X { void operator()(int&); int operator()(int&&); } x; std::result_of< X(int&&) >::type i = x(std::move(0));
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg4300 |
2010-10-21 18:28:33 | admin | set | messages: + msg4299 |
2008-09-10 00:00:00 | admin | create |