begin

| Home | Libraries | People | FAQ | More

##### begin

###### Description

Returns the result type of `begin`.

###### Synopsis

    template<typename Seq>
    struct begin
    {
        typedef unspecified type;
    };

Table 1.23. Parameters

Parameter | Requirement | Description
--- | --- | ---
`Seq` | A model of Forward Sequence | Argument sequence

###### Expression Semantics

    result_of::begin<Seq>::type

Return type:

- A model of Forward Iterator if `seq` is a Forward Sequence else, Bidirectional Iterator if `seq` is a Bidirectional Sequence else, Random Access Iterator if `seq` is a Random Access Sequence.
- A model of Associative Iterator if `seq` is an Associative Sequence.

Semantics: Returns the type of an iterator to the first element of `Seq`.

###### Header

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

###### Example

    typedef vector<int> vec;
    typedef result_of::begin<vec>::type it;
    BOOST_MPL_ASSERT((boost::is_same<result_of::deref<it>::type, int&>))