Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

By using more conventional "value-initializes".

Fixes #7522.

By using more conventional "value-initializes".
Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p has class type with a non-trivial constructor. Even say "default-initializes" would work, or saying nothing and defaulting the default constructor. The latter is probably too large a hammer at this point.

@jwakely , I like the change proposed here as an incremental improvement.

@tkoeppe tkoeppe requested a review from jwakely February 9, 2025 16:19
@tkoeppe
Copy link
Contributor

tkoeppe commented Feb 9, 2025

Agreed, this seems like a generally nicer way to express value initialization. @jwakely?

@tkoeppe tkoeppe merged commit 2f42a31 into cplusplus:main Feb 11, 2025
2 checks passed
@frederick-vs-ja frederick-vs-ja deleted the atomic-shared-weak-ptr-value-init branch February 11, 2025 10:46
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.

[util.smartptr.atomic.shared][util.smartptr.atomic.weak] Weird wording for default constructors

4 participants