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 2019. The current version is 1.89.0.
Returns a type convertible to int
that evaluates the number of elements in the sequence.
template <typename Sequence>
typename result_of::size<Sequence>::type
size(Sequence const& seq);
|
Parameter |
Requirement |
Description |
|---|---|---|
|
|
Model of Forward Sequence |
The sequence we wish to investigate. |
size(seq);
Return type: Convertible to int.
Semantics: Returns the number of elements in the sequence.
#include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/include/size.hpp>
vector<int, int, int> v(1, 2, 3);
assert(size(v) == 3);