Created on 1999-11-11.00:00:00 last changed 263 months ago
Proposed resolution (10/00):
Change the wording proposed in the resolution of issue 20 from
- when a temporary class object (6.7.7 [class.temporary]) would be copied to a class object...
to
- when a temporary class object that has not been bound to a reference (6.7.7 [class.temporary]) would be copied to a class object...
11.4.5.3 [class.copy.ctor] paragraph 15 refers only to "temporary class objects." It needs to be made clear that these provisions do not apply to temporaries that have been bound to references. For instance,
struct A { mutable int value; explicit A(int i) : value(i) {} void mutate(int i) const { value = i; } }; int foo() { A const& t = A(1); A n(t); // can this copy be elided? t.mutate(2); return n.value; // can this return 2? }The current wording seems to allow an implementation not to perform the copy in A N(t) because the source object is a temporary (created explicitly by A(1)).
History | |||
---|---|---|---|
Date | User | Action | Args |
2003-04-25 00:00:00 | admin | set | status: dr -> tc1 |
2000-11-18 00:00:00 | admin | set | status: ready -> dr |
2000-05-21 00:00:00 | admin | set | messages: + msg316 |
2000-05-21 00:00:00 | admin | set | status: open -> ready |
1999-11-11 00:00:00 | admin | create |