MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / GetElementOr

Function GetElementOr

tests/gtest/gtest-all.cc:692–695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690// in range [0, v.size()).
691template <typename E>
692inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
693 return (i < 0 || i >= static_cast<int>(v.size())) ? default_value
694 : v[static_cast<size_t>(i)];
695}
696
697// Performs an in-place shuffle of a range of the vector's elements.
698// 'begin' and 'end' are element indices as an STL-style range;

Callers 4

GetTestSuiteFunction · 0.85
GetMutableSuiteCaseFunction · 0.85
GetTestInfoMethod · 0.85
GetMutableTestInfoMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected