Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70817 - branches/pplib/variadics/libs/preprocessor/test
From: eldiener_at_[hidden]
Date: 2011-04-01 09:54:15


Author: eldiener
Date: 2011-04-01 09:54:15 EDT (Fri, 01 Apr 2011)
New Revision: 70817
URL: http://svn.boost.org/trac/boost/changeset/70817

Log:
Updated test for variadics
Text files modified:
   branches/pplib/variadics/libs/preprocessor/test/tuple.cpp | 18 ++++++++++++++++++
   1 files changed, 18 insertions(+), 0 deletions(-)

Modified: branches/pplib/variadics/libs/preprocessor/test/tuple.cpp
==============================================================================
--- branches/pplib/variadics/libs/preprocessor/test/tuple.cpp (original)
+++ branches/pplib/variadics/libs/preprocessor/test/tuple.cpp 2011-04-01 09:54:15 EDT (Fri, 01 Apr 2011)
@@ -17,8 +17,26 @@
 BEGIN BOOST_PP_TUPLE_ELEM(6, 3, TUPLE) == 3 END
 BEGIN BOOST_PP_TUPLE_ELEM(6, 5, TUPLE) == 5 END
 
+#if BOOST_PP_VARIADICS
+
+BEGIN BOOST_PP_TUPLE_ELEM(3, TUPLE) == 3 END
+BEGIN BOOST_PP_TUPLE_ELEM(5, TUPLE) == 5 END
+
+#endif
+
 # define CALC(x) BOOST_PP_TUPLE_ELEM(3, 0, x) BOOST_PP_TUPLE_ELEM(3, 1, x) BOOST_PP_TUPLE_ELEM(3, 2, x)
 # define T2 (+3, /2, +6)
 
 BEGIN CALC(T2) == 7 END
 BEGIN CALC(BOOST_PP_TUPLE_REVERSE(3, T2)) == 6 END
+
+#if BOOST_PP_VARIADICS
+
+#undef CALC
+
+# define CALC(x) BOOST_PP_TUPLE_ELEM(0, x) BOOST_PP_TUPLE_ELEM(1, x) BOOST_PP_TUPLE_ELEM(2, x)
+
+BEGIN CALC(T2) == 7 END
+BEGIN CALC(BOOST_PP_TUPLE_REVERSE(T2)) == 6 END
+
+#endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk