MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / IndexOfElement

Function IndexOfElement

Bcore/src/main/cpp/base/stl_util.h:93–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91// Find index of the first element with the specified value known to be in the container.
92template <typename Container, typename T>
93size_t IndexOfElement(const Container& container, const T& value) {
94 auto it = std::find(container.begin(), container.end(), value);
95 DCHECK(it != container.end()); // Must exist.
96 return std::distance(container.begin(), it);
97}
98
99// Remove the first element with the specified value known to be in the container.
100template <typename Container, typename T>

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected