Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2023. The current version is 1.90.0.
The header <boost/core/size.hpp> provides function templates size to obtain the number of elements in
a range.
namespace boost { template<class C> constexpr auto size(const C& c) noexcept(noexcept(c.size())) -> decltype(c.size()); template<class T, std::size_t N> constexpr std::size_t size(T(&)[N]) noexcept; } /* boost */
template<class C> constexpr
auto size(const C& c) noexcept(noexcept(c.size()))
-> decltype(c.size());
Returns c.size().
template<class T, std::size_t
N>
constexpr std::size_t
size(T(&)[N]) noexcept;
Returns N.