Closed Bug 888493 Opened 12 years ago Closed 12 years ago

add MOZ_CONSTEXPR_VAR

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: tbsaunde, Assigned: tbsaunde)

References

Details

Attachments

(1 file)

Some compilers don't like things like static const constexpr foo = bar; other compilers don't support constexpr at all so we don't want to just do static MOZ_CONSTEXPR foo = bar; so lets add MOZ_CONSTEXPR_VAR that is constexpr if that is supported and otherwise const.
Comment on attachment 769193 [details] [diff] [review] bug 888493 - add MOZ_CONSTEXPR_VAR and use it in jsrc/ion/ some Review of attachment 769193 [details] [diff] [review]: ----------------------------------------------------------------- ::: mfbt/Attributes.h @@ +129,3 @@ > #else > # define MOZ_CONSTEXPR /* no support */ > +# define MOZ_CONSTEXPR_VAR const Since everything else here is aligned, keep the const/constexpr aligned with the constexpr/no-support comment above each.
Attachment #769193 - Flags: review?(jwalden+bmo) → review+
Backed out in http://hg.mozilla.org/integration/mozilla-inbound/rev/7d6d824067ea https://tbpl.mozilla.org/php/getParsedLog.php?id=24946713&tree=Mozilla-Inbound if you like it Linux-flavored, https://tbpl.mozilla.org/php/getParsedLog.php?id=24946587&tree=Mozilla-Inbound if you like it Windows flavored, everyone agreed that they had no idea what MOZ_THIS_IN_INITIALIZER_LIST you were talking about.
it looks like somehow a hunk remove the this initializer think magically appeared in the patch!?! so I removed that and pushed again remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/040df3280d8c
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Depends on: 1277775
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: