diff options
-rw-r--r-- | base/macros.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/base/macros.h b/base/macros.h index 3ea576c..d904328 100644 --- a/base/macros.h +++ b/base/macros.h @@ -52,18 +52,8 @@ // This template function declaration is used in defining arraysize. // Note that the function doesn't need an implementation, as we only // use its type. -template <typename T, size_t N> -char (&ArraySizeHelper(T (&array)[N]))[N]; - -// That gcc wants both of these prototypes seems mysterious. VC, for -// its part, can't decide which to use (another mystery). Matching of -// template overloads: the final frontier. -#ifndef _MSC_VER -template <typename T, size_t N> -char (&ArraySizeHelper(const T (&array)[N]))[N]; -#endif - -#define arraysize(array) (sizeof(::ArraySizeHelper(array))) +template <typename T, size_t N> char (&ArraySizeHelper(T (&array)[N]))[N]; +#define arraysize(array) (sizeof(ArraySizeHelper(array))) // Use implicit_cast as a safe version of static_cast or const_cast |