Automated Code Change

PiperOrigin-RevId: 955003621
Change-Id: I83518a7f947d9f7d9b89fe14e1219d32bcdc95a3
diff --git a/googlemock/test/gmock_stress_test.cc b/googlemock/test/gmock_stress_test.cc
index 9e42cd9..f45cf67 100644
--- a/googlemock/test/gmock_stress_test.cc
+++ b/googlemock/test/gmock_stress_test.cc
@@ -30,6 +30,8 @@
 // Tests that Google Mock constructs can be used in a large number of
 // threads concurrently.
 
+#include <iterator>
+
 #include "gmock/gmock.h"
 #include "gtest/gtest.h"
 
@@ -188,7 +190,7 @@
       &TestPartiallyOrderedExpectationsWithThreads,
   };
 
-  const int kRoutines = sizeof(test_routines) / sizeof(test_routines[0]);
+  const int kRoutines = std::size(test_routines);
   const int kCopiesOfEachRoutine = kMaxTestThreads / kRoutines;
   const int kTestThreads = kCopiesOfEachRoutine * kRoutines;
   ThreadWithParam<Dummy>* threads[kTestThreads] = {};