mirror of
https://github.com/google/googletest.git
synced 2025-12-04 14:57:29 +08:00
remove GTEST_ARRAY_SIZE_
This macro didn't work when an array was passed to a function by pointer, in which case the information about its size was lost. Better alternatives are: * std::extent<T>::value (compile-time) * std::array<T, N>::size() (compile-time) * std::distance(std::begin(array), std::end(array)) (run-time)
This commit is contained in:
@@ -856,9 +856,6 @@ class Secret;
|
||||
// expression is false, compiler will issue an error containing this identifier.
|
||||
#define GTEST_COMPILE_ASSERT_(expr, msg) static_assert(expr, #msg)
|
||||
|
||||
// Evaluates to the number of elements in 'array'.
|
||||
#define GTEST_ARRAY_SIZE_(array) (sizeof(array) / sizeof(array[0]))
|
||||
|
||||
// A helper for suppressing warnings on constant condition. It just
|
||||
// returns 'condition'.
|
||||
GTEST_API_ bool IsTrue(bool condition);
|
||||
|
||||
Reference in New Issue
Block a user