Bug 1057840 (Part 1) - Expand GCC version bounds for decltype scope operator workaround. r=waldo
authorSeth Fowler <seth@mozilla.com>
Tue, 26 Aug 2014 13:57:43 -0700
changeset 223376 d5cc69b88c4cd2b7ba45b097992ef6dd03e6b412
parent 223375 ee14fb2a1053fff9b4a5cb5f0dd0486ddbe3ceb1
child 223377 20bd30f0fb5c581ec2dcb3f7f37ee77e63964c5f
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo
bugs1057840
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1057840 (Part 1) - Expand GCC version bounds for decltype scope operator workaround. r=waldo
mfbt/tests/TestMaybe.cpp
--- a/mfbt/tests/TestMaybe.cpp
+++ b/mfbt/tests/TestMaybe.cpp
@@ -21,26 +21,26 @@ using mozilla::Nothing;
 using mozilla::Some;
 using mozilla::Swap;
 using mozilla::ToMaybe;
 using mozilla::UniquePtr;
 
 // Work around a bug in Visual Studio 2010 that prevents expressions of the form
 // |decltype(foo)::type| from working. See here:
 // http://stackoverflow.com/questions/14330768/c11-compiler-error-when-using-decltypevar-followed-by-internal-type-of-var
-// GCC 4.4 also appears to have a similar bug.
+// GCC < 4.7 also has a similar bug.
 #if MOZ_IS_MSVC
 #  if MOZ_MSVC_VERSION_AT_LEAST(11)
 #    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
-#  if MOZ_GCC_VERSION_AT_LEAST(4,5,0)
+#  if MOZ_GCC_VERSION_AT_LEAST(4, 7, 0)
 #    define DECLTYPE(EXPR) decltype(EXPR)
 #  else
      template<typename T> struct Identity { typedef T type; };
 #    define DECLTYPE(EXPR) Identity<decltype(EXPR)>::type
 #  endif
 #else
 #  define DECLTYPE(EXPR) decltype(EXPR)
 #endif