Dillon Sharlet 73e0fc18eb Optimize copying of matchers vector to speed up ElementsAreArray by reserving a std::vector copied via push_back.
If the iterators are forward iterators, we can measure the size and reserve the vector, avoiding reallocations and copying.

PiperOrigin-RevId: 874129590
Change-Id: I6cdcaf38e28ac90c1cf596977b703d8de93994e5
2026-02-23 10:02:03 -08:00
..
gmock Optimize copying of matchers vector to speed up ElementsAreArray by reserving a std::vector copied via push_back. 2026-02-23 10:02:03 -08:00