Closed
Bug 905243
Opened 13 years ago
Closed 12 years ago
make mozilla::Atomic constructors constexpr
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: froydnj, Assigned: tbsaunde)
References
Details
Attachments
(2 files)
|
4.69 KB,
patch
|
Details | Diff | Splinter Review | |
|
3.19 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Reporter | ||
Comment 1•13 years ago
|
||
People often use Atomic<T> as top-level global variables. Such uses generate
static constructors for some compilers. This seems undesirable, and contrary
to <atomic>, where std::atomic::atomic(T) is already constexpr, and the no-arg
constructor is |= default|. We can do roughly the same thing in our wrapper
(though we don't have |= default|), and we should, to be efficient.
Attachment #790307 -
Flags: review?(jwalden+bmo)
| Assignee | ||
Comment 2•13 years ago
|
||
Attachment #790419 -
Flags: review?(nfroyd)
| Reporter | ||
Comment 3•13 years ago
|
||
Comment on attachment 790419 [details] [diff] [review]
bug 905243 - make the constructors for mozilla::Atomic constexpr
Review of attachment 790419 [details] [diff] [review]:
-----------------------------------------------------------------
r=me if you:
- add #include "mozilla/Attributes.h" for MOZ_CONSTEXPR;
- add the appropriate MOZ_CONSTEXPR bits for the IsEnum specialization also.
Attachment #790419 -
Flags: review?(nfroyd) → review+
| Reporter | ||
Comment 4•13 years ago
|
||
Comment on attachment 790307 [details] [diff] [review]
make mozilla::Atomic constructors constexpr
Trevor has virtually the same patch.
Attachment #790307 -
Flags: review?(jwalden+bmo)
| Assignee | ||
Comment 5•12 years ago
|
||
Assignee: nobody → trev.saunders
Flags: in-testsuite+
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•