Bug 713560 - Make MOZ_STATIC_ASSERT, when it expands to C++11 static_cast(), pass its reason argument along to static_cast in more compilers. r=typo-fix

This commit is contained in:
Jeff Walden 2011-12-27 12:09:41 -06:00
parent 2b1686ec69
commit 150afa32c7

View File

@ -70,15 +70,15 @@
# elif defined(__GNUC__)
# if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) && \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# define MOZ_STATIC_ASSERT(cond, reason) static_assert((cond), #cond)
# define MOZ_STATIC_ASSERT(cond, reason) static_assert((cond), reason)
# endif
# elif defined(_MSC_VER)
# if _MSC_VER >= 1600 /* MSVC 10 */
# define MOZ_STATIC_ASSERT(cond, reason) static_assert((cond), #cond)
# define MOZ_STATIC_ASSERT(cond, reason) static_assert((cond), reason)
# endif
# elif defined(__HP_aCC)
# if __HP_aCC >= 62500 && defined(_HP_CXX0x_SOURCE)
# define MOZ_STATIC_ASSERT(cond, reason) static_assert((cond), #cond)
# define MOZ_STATIC_ASSERT(cond, reason) static_assert((cond), reason)
# endif
# endif
#endif