BOOST_PP_LIST_TO_TUPLE_R マクロは リストタプル に変換する。  これは BOOST_PP_FOR 内で呼ばれる際には最も効率よく機能する。

Usage

BOOST_PP_LIST_TO_TUPLE_R(r, list)

Arguments

r
次の有効な BOOST_PP_FOR 反復。
list
変換される リスト

Remarks

たとえば、もし リスト が (a, (b, (c, BOOST_PP_NIL))) ならば、 このマクロは
(a, b, c)
を生成するだろう。

See Also

Requirements

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

Sample Code

#include <boost/preprocessor/list/adt.hpp>
#include <boost/preprocessor/list/to_tuple.hpp>
#include <boost/preprocessor/repetition/for.hpp>

#define LIST (x, (y, (z, BOOST_PP_NIL)))

#define PRED(r, state) BOOST_PP_LIST_IS_CONS(state)
#define OP(r, state) BOOST_PP_LIST_REST(state)
#define MACRO(r, state) BOOST_PP_LIST_TO_TUPLE_R(r, state)

BOOST_PP_FOR(LIST, PRED, OP, MACRO)
   // (x, y, z) (y, z) (z) に展開される