| Home | Libraries | People | FAQ | More

### mpl sequence

This module provides adapters for MPL sequences. Including the module header makes all MPL sequences fully conforming fusion sequences.

##### Header

    #include <boost/fusion/adapted/mpl.hpp>
    #include <boost/fusion/include/mpl.hpp>

##### Model of

- Forward Sequence (If the MPL sequence is a forward sequence.)
- Bidirectional Sequence (If the MPL sequence is a bidirectional sequence.)
- Random Access Sequence (If the MPL sequence is a random access sequence.)

##### Example

    mpl::vector_c<int, 123, 456> vec_c;
    fusion::vector2<int, long> v(vec_c);
    std::cout << at_c<0>(v) << std::endl;
    std::cout << at_c<1>(v) << std::endl;

    v = mpl::vector_c<int, 456, 789>();
    std::cout << at_c<0>(v) << std::endl;
    std::cout << at_c<1>(v) << std::endl;

##### Bi-directional adaptation

Fusion sequences may also be adapted as fully conforming MPL sequences (see Intrinsics). That way, we can have 2-way adaptation to and from MPL and Fusion. To make Fusion sequences fully conforming MPL sequences, include:

    #include <boost/fusion/mpl.hpp>

If you want bi-directional adaptation to and from MPL and Fusion, simply include:

    #include <boost/fusion/include/mpl.hpp>

The header includes all the necessary headers.

##### See also

MPL