Backed out changeset ec696ad6ff10 (bug 963056) for build bustage on a CLOSED TREE

This commit is contained in:
Wes Kocher 2014-02-05 16:19:06 -08:00
parent 7edf86f691
commit f7eedc6c76

View File

@ -82,17 +82,6 @@ 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 */
@ -102,8 +91,8 @@ char (&ArrayLengthHelper(T (&array)[N]))[N];
* 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