Backed out changeset ec696ad6ff10 (bug 963056) for build bustage on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Wed, 05 Feb 2014 16:19:06 -0800
changeset 184321 7d24d7dfbb530bf042b4c75265b0b79e4b5249b2
parent 184320 daa1d43152d7ad089e4d50521562856b16185462
child 184322 5282b4fa4cea935add054c75a09d32e6d29b741a
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs963056
milestone30.0a1
backs outec696ad6ff10b362bbf56725228fcd8155eabf72
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
Backed out changeset ec696ad6ff10 (bug 963056) for build bustage on a CLOSED TREE
mfbt/ArrayUtils.h
--- a/mfbt/ArrayUtils.h
+++ b/mfbt/ArrayUtils.h
@@ -77,35 +77,24 @@ ArrayEnd(Array<T, N>& arr)
 
 template<typename T, size_t N>
 MOZ_CONSTEXPR const T*
 ArrayEnd(const Array<T, N>& arr)
 {
   return &arr[0] + ArrayLength(arr);
 }
 
-namespace detail {
-
-/*
- * Helper for the MOZ_ARRAY_LENGTH() macro to make the length a typesafe
- * compile-time constant even on compilers lacking constexpr support.
- */
-template <typename T, size_t N>
-char (&ArrayLengthHelper(T (&array)[N]))[N];
-
-} /* namespace detail */
-
 } /* namespace mozilla */
 
 #endif /* __cplusplus */
 
 /*
  * MOZ_ARRAY_LENGTH() is an alternative to mozilla::ArrayLength() for C files
  * that can't use C++ template functions and for static_assert() calls that
  * can't call ArrayLength() when it is not a C++11 constexpr function.
  */
-#ifdef __cplusplus
-#  define MOZ_ARRAY_LENGTH(array)   sizeof(mozilla::detail::ArrayLengthHelper(array))
+#ifdef MOZ_HAVE_CXX11_CONSTEXPR
+#  define MOZ_ARRAY_LENGTH(array)   mozilla::ArrayLength(array)
 #else
 #  define MOZ_ARRAY_LENGTH(array)   (sizeof(array)/sizeof((array)[0]))
 #endif
 
 #endif /* mozilla_ArrayUtils_h */