#include <boost/preprocessor/tuple/elem.hpp>
#define TUPLE (a, b, c, d)
BOOST_PP_TUPLE_ELEM(4, 0, TUPLE) // expands to a
BOOST_PP_TUPLE_ELEM(4, 3, TUPLE) // expands to d
// or for the variadic version (v)
BOOST_PP_TUPLE_ELEM(0, TUPLE) // expands to a in the variadic version
BOOST_PP_TUPLE_ELEM(3, TUPLE) // expands to d in the variadic version
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)