The BOOST_PP_ARRAY_TO_TUPLE macro converts an array to an tuple.

Usage

BOOST_PP_ARRAY_TO_TUPLE(array)

Arguments

array
The array to be converted.

Remarks

    If the array to be converted is empty, as represented by '( 0, () )', the resulting tuple is undefined since a tuple cannot be empty.

Requirements

Header:  <boost/preprocessor/array/to_tuple.hpp>

Sample Code

#include <boost/preprocessor/array/to_tuple.hpp>

#define ARRAY (3,(a, b, c))

BOOST_PP_ARRAY_TO_TUPLE(ARRAY) // expands to (a, b, c)

© Copyright Edward Diener 2011

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)