Created on2014-10-31.00:00:00 last changed109 months ago
[Moved to DR at the October, 2015 meeting.]
Proposed resolution (May, 2015):
Add the following as a new subsection in C.6.3 [diff.cpp03.expr]:
7.6.15 [expr.log.or]
Change:&& is valid in atype-name
Rationale: Required for new features
Effect on original feature: Valid C++ 2003 code may fail tocompile or produce different results in this InternationalStandard, as the following example illustrates:bool b1 = new int && false; // previouslyfalse, now ill-formed struct S { operator int(); }; bool b2 = &S::operator int && false; // previouslyfalse, now ill-formed
The introduction of rvalue references in C++11 changed theinterpretation of some previously well-formed examples such asthe following:
struct Struct { template <typename T> operator T(); }; bool example_1 = new int && false; // #1 bool example_2 = &Struct::operator int && false; // #2Previously the&& was interpreted as an operator,while it is now part of atype-name. However, this change isnot mentioned in Annex Clause Annex C [diff].
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017-02-06 00:00:00 | admin | set | status: dr -> cd4 |
| 2015-11-10 00:00:00 | admin | set | messages: +msg6085 |
| 2015-11-10 00:00:00 | admin | set | status: ready -> dr |
| 2015-05-25 00:00:00 | admin | set | messages: +msg5470 |
| 2015-05-25 00:00:00 | admin | set | status: drafting -> ready |
| 2014-10-31 00:00:00 | admin | create | |