Closed Bug 1247338 Opened 4 years ago Closed 4 years ago

really make Atomic's constructor constexpr

Categories

(Core :: MFBT, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(1 file)

Atomic's constructor is marked as constexpr, but it calls a
non-constexpr function, ToStorageTypeArgument::convert.  For compilers
which require constexpr-ness on constructors to inline away the actual
constructor call, the call to ToStorageTypeArgument::convert completely
disables the constexpr-ness of the constructor.  Let's fix this by
marking all relevant instances of ToStorageTypeArgument::convert as
MOZ_CONSTEXPR, thus satisfying the compiler once again.
Waldo committed the patch which caused the problem, and I reviewed it, so let's
do this dance again, but slightly differently.
Attachment #8717994 - Flags: review?(jwalden+bmo)
Comment on attachment 8717994 [details] [diff] [review]
really make Atomic's constructor constexpr

Review of attachment 8717994 [details] [diff] [review]:
-----------------------------------------------------------------

Oops.
Attachment #8717994 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/09c28fca8ee7
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Duplicate of this bug: 1249616
You need to log in before you can comment on or make changes to this bug.