Homec4science

remove GTEST_ARRAY_SIZE_

Authored by Krystian Kuzniarek <krystian.kuzniarek@gmail.com> on Sep 5 2019, 01:03.

Description

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)

Details

Committed
Krystian Kuzniarek <krystian.kuzniarek@gmail.com>Sep 23 2019, 19:31
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:f2fb48c3b3d7: Googletest export
Branches
Unknown
Tags
Unknown

Event Timeline

Krystian Kuzniarek <krystian.kuzniarek@gmail.com> committed R9484:e0d16aa33662: remove GTEST_ARRAY_SIZE_ (authored by Krystian Kuzniarek <krystian.kuzniarek@gmail.com>).Sep 23 2019, 19:31