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 the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Array

This module provides adapters for arrays. Including the module header makes any array a fully conforming Random Access Sequence.

Header
#include <boost/fusion/adapted/array.hpp>
#include <boost/fusion/include/array.hpp>
Model of
Example
int arr[3] = {1,2,3};

std::cout << *begin(arr) << std::endl;
std::cout << *next(begin(arr)) << std::endl;
std::cout << *advance_c<2>(begin(arr)) << std::endl;
std::cout << *prior(end(arr)) << std::endl;
std::cout << at_c<2>(arr) << std::endl;

PrevUpHomeNext