Skip to content

Conversation

@xmcgcg
Copy link
Contributor

@xmcgcg xmcgcg commented Apr 11, 2025

[indirect.asgn] p4 says:

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 assignment.

The wording is copied from the description of the copy assignment operator of std::optional, which has a contained value (defined in [optional.optional.general] p1). For std::indirect, there is no “contained value”, “owned object” should be used instead.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 17, 2025

@jbcoe: Any thoughts?

@jbcoe
Copy link

jbcoe commented Jun 17, 2025

owned object

"owned object" sounds correct.

@tkoeppe tkoeppe merged commit 9d20a32 into cplusplus:main Jun 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants