iterator.hpp
contains ct_capacity, a constexpr function that returns the capacity of a
container which is known at compile-time.
auto const a = std::array{1, 2, 3, 4};
constexpr auto c = stdx::ct_capacity(a); // std::size_t{4}ct_capacity can be called with:
-
std::array -
std::span(unless it hasstd::dynamic_extent) -
stdx::span(unless it hasstdx::dynamic_extent) -
stdx::cx_map -
stdx::cx_multimap -
stdx::cx_queue -
stdx::cx_set -
stdx::cx_vector
ct_capacity_v is a corresponding variable template of type std::size_t.