http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59681

--- Comment #3 from Peter A. Bigot <pab at pabigot dot com> ---
But also note [dcl.type.simple] p4:

The type denoted by decltype(e) is defined as follows:
— if e is an unparenthesized id-expression or an unparenthesized class member
access (5.2.5), decltype(e) is the type of the entity named by e. If there is
no such entity, or if e names a set of overloaded functions, the program is
ill-formed;
— otherwise, if e is an xvalue, decltype(e) is T&&, where T is the type of e;
— otherwise, if e is an lvalue, decltype(e) is T&, where T is the type of e;
— otherwise, decltype(e) is the type of e.
The operand of the decltype specifier is an unevaluated operand (Clause 5).

which means decltype((e)) is not necessarily the same as decltype(e).

Perhaps the change was made to make this work, but it has side effects in some
context that does not (explicitly) use decltype.

Reply via email to