Title
[fund.ts] Incorrect exception safety for optional copy assignment operator
Status
resolved
Section
[optional.object.assign]
Submitter
Howard Hinnant

Created on 2013-08-16.00:00:00 last changed 128 months ago

Messages

Date: 2014-06-17.08:47:43

Proposed resolution:

This wording is relative to N3691.

  1. Change [optional.object.assign] as indicated:

    optional<T>& operator=(const optional<T>& rhs);
    

    […]

    -8- Exception safety: If any exception is thrown, the values of init and rhs.init remain unchanged. If an exception is thrown during the call to T's copy constructor, no effect. If an exception is thrown during the call to T's copy assignment, the state of its contained value is as defined by the exception safety guarantee of T's copy constructorassignment.

Date: 2014-06-16.00:00:00

[ 2014-06-16 Rapperswill ]

Confirmed that this issue is resolved in the current Library Fundamentals working paper.

Date: 2014-06-07.00:00:00

[ 2014-06-07 Daniel comments ]

This issue should be set to Resolved, because the wording fix is already applied in the last fundamentals working draft.

Date: 2014-06-06.00:00:00

[ 2014-06-06 pre-Rapperswill ]

This issue has been reopened as fundamentals-ts.

Date: 2014-06-06.21:18:30

[ 2013-09 Chicago: ]

Move to Deferred. This feature will ship after C++14 and should be revisited then.

Date: 2014-06-06.21:18:30

Addresses: fund.ts

The Exception safety paragraph of [optional.object.assign] calls out T's copy constructor when it should refer to T's copy assignment operator.

History
Date User Action Args
2014-06-17 08:47:43adminsetmessages: + msg7059
2014-06-17 08:47:43adminsetstatus: open -> resolved
2014-06-07 17:23:44adminsetmessages: + msg7007
2014-06-06 21:18:30adminsetmessages: + msg6996
2014-06-06 21:18:30adminsetstatus: deferred -> open
2013-09-26 11:12:18adminsetmessages: + msg6633
2013-09-26 11:12:18adminsetstatus: new -> deferred
2013-09-01 21:12:19adminsetmessages: + msg6581
2013-08-16 00:00:00admincreate