Bug 989460 - Follow-up: Fix MOZ_STATIC_ASSERT_VALID_ARG_COUNT when 51st arg is e.g. `true != 1`. r=froydnj
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Fri, 25 Apr 2014 10:00:00 -0400
changeset 198816 fb880322be81fe54bb7fb147be7db4cb27832106
parent 198815 1676c8fa75462153b00aafbe31fbc1e161ee1a60
child 198817 aa534ca9cea506e444dd195f10c43e4d1d417c72
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs989460
milestone31.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 989460 - Follow-up: Fix MOZ_STATIC_ASSERT_VALID_ARG_COUNT when 51st arg is e.g. `true != 1`. r=froydnj
mfbt/MacroArgs.h
--- a/mfbt/MacroArgs.h
+++ b/mfbt/MacroArgs.h
@@ -78,18 +78,18 @@
  * number than can simultaneously be both > 10 and < 0.1. If the exceeding
  * argument is not a number, a compile-time error will still occur because the
  * exceeding argument is compared to an int and a double.
  */
 #define MOZ_MACROARGS_STRINGIFY_HELPER(x) #x
 #define MOZ_STATIC_ASSERT_VALID_ARG_COUNT(...) \
   static_assert( \
     sizeof(MOZ_MACROARGS_STRINGIFY_HELPER((__VA_ARGS__))) != sizeof("()") && \
-      MOZ_PASTE_PREFIX_AND_ARG_COUNT(1, __VA_ARGS__) > 10 && \
-      MOZ_PASTE_PREFIX_AND_ARG_COUNT(0.0, __VA_ARGS__) < 0.1, \
+      (MOZ_PASTE_PREFIX_AND_ARG_COUNT(1, __VA_ARGS__)) > 10 && \
+      (MOZ_PASTE_PREFIX_AND_ARG_COUNT(0.0, __VA_ARGS__)) < 0.1, \
     "MOZ_STATIC_ASSERT_VALID_ARG_COUNT requires 1 to 50 arguments") /* ; */
 
 /*
  * MOZ_ARGS_AFTER_N expands to its arguments excluding the first |N|
  * arguments. For example:
  *
  *   MOZ_ARGS_AFTER_2(a, b, c, d) expands to: c, d
  */