size

| Home | Libraries | People | FAQ | More

##### size

###### Description

Returns a type convertible to `int` that evaluates the number of elements in the sequence.

###### Synopsis

    template <typename Sequence>
    typename result_of::size<Sequence>::type
    size(Sequence const& seq);

###### Parameters

Parameter | Requirement | Description
--- | --- | ---
`seq` | Model of Forward Sequence | The sequence we wish to investigate.

###### Expression Semantics

    size(seq);

Return type: Convertible to `int`.

Semantics: Returns the number of elements in the sequence.

###### Header

    #include <boost/fusion/sequence/intrinsic/size.hpp>
    #include <boost/fusion/include/size.hpp>

###### Example

    vector<int, int, int> v(1, 2, 3);
    assert(size(v) == 3);