You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just notice that the example in [dcl.type.simple]
const int&& foo();
int i;
[..]
decltype(foo()) x1 = i; // type is const int&&
looks erroneous. The defect is that you cannot initialize a variable
"const int&&" with an lvalue of int (as shown here). A possible fix
would be to write this as:
const int&& foo();
[..]
decltype(foo()) x1 = 0; // type is const int&&
(this is: Including a strike of the variable 'i').
My understanding is that this is an editorial defect, because
From an email to cxxeditor@:
I just notice that the example in [dcl.type.simple]
looks erroneous. The defect is that you cannot initialize a variable
"const int&&" with an lvalue of int (as shown here). A possible fix
would be to write this as:
(this is: Including a strike of the variable 'i').
My understanding is that this is an editorial defect, because
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#651
already suggested a fix of the examples here.
The text was updated successfully, but these errors were encountered: