diff --git a/doc/ref/identity_n.html b/doc/ref/identity_n.html index 0c01dd3..13fc5e0 100644 --- a/doc/ref/identity_n.html +++ b/doc/ref/identity_n.html @@ -33,7 +33,7 @@
diff --git a/doc/ref/tuple_eat.html b/doc/ref/tuple_eat.html index 963647f..f1d7c1c 100644 --- a/doc/ref/tuple_eat.html +++ b/doc/ref/tuple_eat.html @@ -42,7 +42,7 @@ not occur.
Header: <boost/preprocessor/tuple/eat.hpp>
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/tuple/eat.hpp>
#define OP(a, b) (a b)
#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT(2))(1, 2)
// or for the variadic version (v)
#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT())(1, 2)
MACRO(0) // expands to nothing
MACRO(1) // expands to (1, 2)
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/tuple/eat.hpp>
#define OP(a, b) (a b)
#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT(2))(1, 2)
// or for the variadic version (v)
#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT())(1, 2)
MACRO(0) // expands to nothing
MACRO(1) // expands to (1, 2)
#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
#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