-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Default for AtomicPtr? #24613
Copy link
Copy link
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Is there any reason why there isn't an
ATOMIC_PTR_INIT(cfATOMIC_BOOL_INIT,ATOMIC_ISIZE_INIT, &c.) struct? I'd like to use AtomicPtrs in statically-initialized variables - andAtomicPtris the only atomic class that doesn't implement theDefaulttrait. A std::ptr::null_mut() seems to be a sensible initial value.