absl::c_distance

Container-based version of the <iterator> std::distance() function to return the number of elements within a container.

Synopsis

Declared in <absl/algorithm/container.h>

template<typename C>
constexpr
/* implementation-defined */
c_distance(C const& c);

Return Value

The number of elements in c.

Parameters

NameDescription
cThe container whose elements to count.