Closed Bug 1329236 Opened 5 years ago Closed 5 years ago

Remove the DECLTYPE(expr) workaround in TestMaybe.cpp

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: away, Assigned: away)

Details

Attachments

(1 file)

14.92 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
Attached patch decltypeSplinter Review
While browsing blame I happened to notice that https://hg.mozilla.org/mozilla-central/rev/1ce77cbf99f3 replaced:

-#if MOZ_IS_MSVC
-#  if MOZ_MSVC_VERSION_AT_LEAST(12)
-#    define DECLTYPE(EXPR) decltype(EXPR)
-#  else
-     template<typename T> struct Identity { typedef T type; };
-#    define DECLTYPE(EXPR) Identity<decltype(EXPR)>::type
-#  endif
-#elif MOZ_IS_GCC

with:

+#if MOZ_IS_MSVC
+   template<typename T> struct Identity { typedef T type; };
+#  define DECLTYPE(EXPR) Identity<decltype(EXPR)>::type
+#elif MOZ_IS_GCC

It looks to me like that change was the opposite of the intent (removing pre-VC12 workarounds). I dug around and found bug 1057840 comment 10 where I had tested that VC12 is OK. So I think we can remove it, unless... Ehsan can you remember something about this situation that I'm not seeing here?
Attachment #8824480 - Flags: review?(ehsan)
Comment on attachment 8824480 [details] [diff] [review]
decltype

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

I don't remember anything that tells me we shouldn't do this.  I suspect if we break people's builds we'll get bug reports pretty soon!
Attachment #8824480 - Flags: review?(ehsan) → review+
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e90c39747430
Remove the DECLTYPE(expr) workaround in TestMaybe.cpp. r=ehsan
https://hg.mozilla.org/mozilla-central/rev/e90c39747430
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.