Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75984 - in sandbox/closure/boost/closure: aux_/preprocessor/variadic aux_/preprocessor/variadic/variadic_macro_data detail
From: lorcaminiti_at_[hidden]
Date: 2011-12-16 06:59:33


Author: lcaminiti
Date: 2011-12-16 06:59:32 EST (Fri, 16 Dec 2011)
New Revision: 75984
URL: http://svn.boost.org/trac/boost/changeset/75984

Log:
Ranming pp-variadics.
Added:
   sandbox/closure/boost/closure/detail/
Removed:
   sandbox/closure/boost/closure/aux_/preprocessor/variadic/eat.hpp
   sandbox/closure/boost/closure/aux_/preprocessor/variadic/same.hpp
   sandbox/closure/boost/closure/aux_/preprocessor/variadic/variadic_macro_data/
Text files modified:
   sandbox/closure/boost/closure/aux_/preprocessor/variadic/is.hpp | 34 ++++++++++++++++------------------
   sandbox/closure/boost/closure/aux_/preprocessor/variadic/size.hpp | 27 ++++++++++++++-------------
   sandbox/closure/boost/closure/aux_/preprocessor/variadic/to_seq.hpp | 26 ++++++++++++--------------
   3 files changed, 42 insertions(+), 45 deletions(-)

Deleted: sandbox/closure/boost/closure/aux_/preprocessor/variadic/eat.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/variadic/eat.hpp 2011-12-16 06:59:32 EST (Fri, 16 Dec 2011)
+++ (empty file)
@@ -1,19 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
-// copy at http://www.boost.org/LICENSE_1_0.txt).
-
-#ifndef BOOST_LOCAL_AUX_PP_VARIADIC_EAT_HPP_
-#define BOOST_LOCAL_AUX_PP_VARIADIC_EAT_HPP_
-
-#include <boost/config.hpp>
-
-#if !defined(BOOST_NO_VARIADIC_MACROS) // If no variadics then no macros.
-
-#define BOOST_LOCAL_AUX_PP_VARIADIC_EAT(...) /* must expand to nothing */
-
-#endif // BOOST_NO_VARIADIC_MACROS
-
-#endif // #include guard
-

Modified: sandbox/closure/boost/closure/aux_/preprocessor/variadic/is.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/variadic/is.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/variadic/is.hpp 2011-12-16 06:59:32 EST (Fri, 16 Dec 2011)
@@ -4,15 +4,14 @@
 // License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
 // copy at http://www.boost.org/LICENSE_1_0.txt).
 
-#ifndef BOOST_LOCAL_AUX_PP_IS_VARIADIC_HPP_
-#define BOOST_LOCAL_AUX_PP_IS_VARIADIC_HPP_
+#ifndef BOOST_CLOSURE_AUX_PP_IS_VARIADIC_HPP_
+#define BOOST_CLOSURE_AUX_PP_IS_VARIADIC_HPP_
 
 #include <boost/config.hpp>
 
 #if !defined(BOOST_NO_VARIADIC_MACROS) // If no variadics then no macros.
 
-#include "size.hpp"
-#include "eat.hpp"
+#include <boost/closure/aux_/preprocessor/size.hpp>
 #include <boost/preprocessor/logical/compl.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/comparison/equal.hpp>
@@ -22,42 +21,41 @@
 
 // PRIVATE //
 
-#define BOOST_LOCAL_AUX_PP_IS_VARIADIC_NOT_UNARY1_(tokens) \
+#define BOOST_CLOSURE_AUX_PP_IS_VARIADIC_NOT_UNARY1_(tokens) \
     BOOST_PP_COMPL(BOOST_PP_IS_UNARY(tokens))
     
-#define BOOST_LOCAL_AUX_PP_IS_VARIADIC_REMOVE1_(tokens) /* nothing */
+#define BOOST_CLOSURE_AUX_PP_IS_VARIADIC_REMOVE1_(tokens) /* nothing */
         
 // Tokens `(t1) t2`.
-#define BOOST_LOCAL_AUX_PP_IS_VARIADIC_SKIP1_(tokens) \
- BOOST_LOCAL_AUX_PP_IS_VARIADIC_NOT_UNARY1_( \
- BOOST_LOCAL_AUX_PP_IS_VARIADIC_REMOVE1_ tokens \
+#define BOOST_CLOSURE_AUX_PP_IS_VARIADIC_SKIP1_(tokens) \
+ BOOST_CLOSURE_AUX_PP_IS_VARIADIC_NOT_UNARY1_( \
+ BOOST_CLOSURE_AUX_PP_IS_VARIADIC_REMOVE1_ tokens \
         (1) /* trailing unary handles empty */ \
     )
 
-#define BOOST_LOCAL_AUX_PP_IS_VARIADIC_NOT_UNARY2_(tokens) \
+#define BOOST_CLOSURE_AUX_PP_IS_VARIADIC_NOT_UNARY2_(tokens) \
     BOOST_PP_IIF(BOOST_PP_IS_UNARY(tokens), \
- BOOST_LOCAL_AUX_PP_IS_VARIADIC_SKIP1_ \
+ BOOST_CLOSURE_AUX_PP_IS_VARIADIC_SKIP1_ \
     , \
         1 /* it is not unary */ \
         BOOST_PP_TUPLE_EAT(1) \
     )(tokens)
 
-#define BOOST_LOCAL_AUX_PP_IS_VARIADIC_(size, ...) \
+#define BOOST_CLOSURE_AUX_PP_IS_VARIADIC_(size, ...) \
     BOOST_PP_IIF(BOOST_PP_EQUAL(size, 1), \
- BOOST_LOCAL_AUX_PP_IS_VARIADIC_NOT_UNARY2_ \
+ BOOST_CLOSURE_AUX_PP_IS_VARIADIC_NOT_UNARY2_ \
     , /* size == 0 or size > 1 (it's variadic) */ \
         1 \
- BOOST_LOCAL_AUX_PP_VARIADIC_EAT \
+ BOOST_CLOSURE_AUX_PP_VARIADIC_EAT \
     )(__VA_ARGS__)
 
 // PUBLIC //
 
-#define BOOST_LOCAL_AUX_PP_IS_VARIADIC(...) \
- BOOST_LOCAL_AUX_PP_IS_VARIADIC_( \
- BOOST_LOCAL_AUX_PP_VARIADIC_SIZE(__VA_ARGS__), __VA_ARGS__)
+#define BOOST_CLOSURE_AUX_PP_IS_VARIADIC(...) \
+ BOOST_CLOSURE_AUX_PP_IS_VARIADIC_( \
+ BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE(__VA_ARGS__), __VA_ARGS__)
 
 #endif // BOOST_NO_VARIADIC_MACROS
 
 #endif // #include guard
 
-

Deleted: sandbox/closure/boost/closure/aux_/preprocessor/variadic/same.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/variadic/same.hpp 2011-12-16 06:59:32 EST (Fri, 16 Dec 2011)
+++ (empty file)
@@ -1,19 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
-// copy at http://www.boost.org/LICENSE_1_0.txt).
-
-#ifndef BOOST_LOCAL_AUX_PP_VARIADIC_SAME_HPP_
-#define BOOST_LOCAL_AUX_PP_VARIADIC_SAME_HPP_
-
-#include <boost/config.hpp>
-
-#if !defined(BOOST_NO_VARIADIC_MACROS) // If no variadics then no macros.
-
-#define BOOST_LOCAL_AUX_PP_VARIADIC_SAME(...) __VA_ARGS__
-
-#endif // BOOST_NO_VARIADIC_MACROS
-
-#endif // #include guard
-

Modified: sandbox/closure/boost/closure/aux_/preprocessor/variadic/size.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/variadic/size.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/variadic/size.hpp 2011-12-16 06:59:32 EST (Fri, 16 Dec 2011)
@@ -4,45 +4,46 @@
 // License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
 // copy at http://www.boost.org/LICENSE_1_0.txt).
 
-#ifndef BOOST_LOCAL_AUX_PP_VARIADIC_SIZE_HPP_
-#define BOOST_LOCAL_AUX_PP_VARIADIC_SIZE_HPP_
+#ifndef BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE_HPP_
+#define BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE_HPP_
 
 #include <boost/config.hpp>
 
 #if !defined(BOOST_NO_VARIADIC_MACROS) // If no variadics then no macros.
 
-#include "eat.hpp"
-#include <boost/detail/preprocessor/variadic_macro_data/vmd.hpp>
+#include <boost/preprocessor/variadic/size.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/comparison/equal.hpp>
 #include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/preprocessor/facilities/is_empty.hpp>
+#include <boost/preprocessor/tuple/eat.hpp> // For PP_EAT.
 // `IS_UNARY` not working on Borland and other pp which have no variadic anyway.
 #include <boost/preprocessor/detail/is_unary.hpp>
 
 // PRIVATE //
 
-#define BOOST_LOCAL_AUX_PP_VARIADIC_SIZE_1OR0_TOKEN_(maybe_empty) \
+#define BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE_1OR0_TOKEN_(maybe_empty) \
     BOOST_PP_IIF(BOOST_PP_IS_EMPTY(maybe_empty (/*exapnd empty */) ), 0, 1)
 
-#define BOOST_LOCAL_AUX_PP_VARIADIC_SIZE_1OR0_(maybe_empty) \
+#define BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE_1OR0_(maybe_empty) \
     BOOST_PP_IIF(BOOST_PP_IS_UNARY(maybe_empty (/*exapnd empty */) ), \
- 1 BOOST_LOCAL_AUX_PP_VARIADIC_EAT \
+ 1 BOOST_PP_EAT \
     , \
- BOOST_LOCAL_AUX_PP_VARIADIC_SIZE_1OR0_TOKEN_ \
+ BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE_1OR0_TOKEN_ \
     )(maybe_empty)
 
-#define BOOST_LOCAL_AUX_PP_VARIADIC_SIZE_(size, ...) \
+#define BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE_(size, ...) \
     BOOST_PP_IIF(BOOST_PP_EQUAL(size, 1), \
- BOOST_LOCAL_AUX_PP_VARIADIC_SIZE_1OR0_ \
+ BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE_1OR0_ \
     , \
- size BOOST_LOCAL_AUX_PP_VARIADIC_EAT \
+ size BOOST_PP_EAT \
     )(__VA_ARGS__ BOOST_PP_EMPTY)
 
 // PUBLIC //
 
-#define BOOST_LOCAL_AUX_PP_VARIADIC_SIZE(...) \
- BOOST_LOCAL_AUX_PP_VARIADIC_SIZE_(BOOST_DETAIL_PP_VMD_DATA_SIZE( \
+// Expand () to 0 (differently from BOOST_PP_VARIADIC_SIZE() that expand to 1).
+#define BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE(...) \
+ BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE_(BOOST_PP_VARIADIC_SIZE( \
             __VA_ARGS__), __VA_ARGS__)
 
 #endif // BOOST_NO_VARIADIC_MACROS

Modified: sandbox/closure/boost/closure/aux_/preprocessor/variadic/to_seq.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/variadic/to_seq.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/variadic/to_seq.hpp 2011-12-16 06:59:32 EST (Fri, 16 Dec 2011)
@@ -4,38 +4,36 @@
 // License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
 // copy at http://www.boost.org/LICENSE_1_0.txt).
 
-#ifndef BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ_HPP_
-#define BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ_HPP_
+#ifndef BOOST_CLOSURE_AUX_PP_VARIADIC_TO_SEQ_HPP_
+#define BOOST_CLOSURE_AUX_PP_VARIADIC_TO_SEQ_HPP_
 
 #include <boost/config.hpp>
 
 #if !defined(BOOST_NO_VARIADIC_MACROS) // If no variadics then no macros.
 
-#include "is.hpp"
-#include "same.hpp"
-#include "eat.hpp"
-#include <boost/detail/preprocessor/variadic_macro_data/vmd.hpp>
+#include <boost/closure/aux_/preprocessor/variadic/is.hpp>
+#include <boost/preprocessor/variadic/to_seq.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/control/if.hpp>
 
 // PRIVATE //
 
-#define BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ_NOT_EMPTY_(...) \
- BOOST_PP_IIF(BOOST_LOCAL_AUX_PP_IS_VARIADIC(__VA_ARGS__), \
- BOOST_DETAIL_PP_VMD_DATA_TO_PP_SEQ \
+#define BOOST_CLOSURE_AUX_PP_VARIADIC_TO_SEQ_NOT_EMPTY_(...) \
+ BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_IS_VARIADIC(__VA_ARGS__), \
+ BOOST_PP_VARIADIC_TO_SEQ \
     , \
- BOOST_LOCAL_AUX_PP_VARIADIC_SAME \
+ BOOST_PP_REM \
     )(__VA_ARGS__)
 
 // PUBLIC //
 
 // Expand to `(arg0)(arg1)...` is __VA_ARGS__ is `arg0, arg1, ...` or already
 // `(arg0)(arg1)...`, if __VA_ARGS__ is empty `` expand to `empty_seq`.
-#define BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ(empty_seq, ...) \
- BOOST_PP_IF(BOOST_LOCAL_AUX_PP_VARIADIC_SIZE(__VA_ARGS__), \
- BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ_NOT_EMPTY_ \
+#define BOOST_CLOSURE_AUX_PP_VARIADIC_TO_SEQ(empty_seq, ...) \
+ BOOST_PP_IF(BOOST_CLOSURE_AUX_PP_VARIADIC_SIZE(__VA_ARGS__), \
+ BOOST_CLOSURE_AUX_PP_VARIADIC_TO_SEQ_NOT_EMPTY_ \
     , \
- empty_seq BOOST_LOCAL_AUX_PP_VARIADIC_EAT \
+ empty_seq BOOST_PP_EAT \
     )(__VA_ARGS__)
 
 #endif // BOOST_NO_VARIADIC_MACROS


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