Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2007-12-10 22:45:21


Author: eric_niebler
Date: 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
New Revision: 41964
URL: http://svn.boost.org/trac/boost/changeset/41964

Log:
clean-up
Added:
   branches/proto/v3/boost/xpressive/proto/detail/define.hpp (contents, props changed)
   branches/proto/v3/boost/xpressive/proto/detail/undef.hpp (contents, props changed)
Text files modified:
   branches/proto/v3/boost/xpressive/proto/args.hpp | 14 ++------------
   branches/proto/v3/boost/xpressive/proto/context/default.hpp | 26 ++------------------------
   branches/proto/v3/boost/xpressive/proto/deep_copy.hpp | 14 ++------------
   branches/proto/v3/boost/xpressive/proto/eval.hpp | 5 ++---
   branches/proto/v3/boost/xpressive/proto/fusion.hpp | 14 ++------------
   branches/proto/v3/boost/xpressive/proto/generate.hpp | 10 ++--------
   branches/proto/v3/boost/xpressive/proto/make_expr.hpp | 26 ++------------------------
   branches/proto/v3/boost/xpressive/proto/matches.hpp | 9 ++-------
   branches/proto/v3/boost/xpressive/proto/operators.hpp | 5 ++---
   branches/proto/v3/boost/xpressive/proto/traits.hpp | 26 ++------------------------
   branches/proto/v3/boost/xpressive/proto/transform/arg.hpp | 26 ++------------------------
   branches/proto/v3/boost/xpressive/proto/transform/call.hpp | 26 ++------------------------
   branches/proto/v3/boost/xpressive/proto/transform/fold.hpp | 10 ++--------
   branches/proto/v3/boost/xpressive/proto/transform/fold_tree.hpp | 26 ++------------------------
   14 files changed, 28 insertions(+), 209 deletions(-)

Modified: branches/proto/v3/boost/xpressive/proto/args.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/args.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/args.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -13,15 +13,7 @@
 #include <boost/type_traits.hpp>
 #include <boost/utility/result_of.hpp>
 #include <boost/xpressive/proto/proto_fwd.hpp>
-
-#define UNCV(X) \
- typename remove_cv<X>::type
-
-#define UNREF(X) \
- typename remove_reference<X>::type
-
-#define UNCVREF(X) \
- UNCV(UNREF(X))
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -167,8 +159,6 @@
 
 }}
 
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/context/default.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/context/default.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/context/default.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -22,24 +22,7 @@
 #include <boost/xpressive/proto/eval.hpp>
 #include <boost/xpressive/proto/traits.hpp> // for proto::arg_c()
 #include <boost/xpressive/proto/detail/indices.hpp>
-
-#define CV(T)\
- typename add_const<T>::type
-
-#define REF(T)\
- typename add_reference<T>::type
-
-#define CVREF(T)\
- REF(CV(T))
-
-#define UNCV(T)\
- typename remove_cv<T>::type
-
-#define UNREF(T)\
- typename remove_reference<T>::type
-
-#define UNCVREF(T)\
- UNCV(UNREF(T))
+#include <boost/xpressive/proto/detail/define.hpp>
 
 // If we're generating doxygen documentation, hide all the nasty
 // Boost.Typeof gunk.
@@ -388,11 +371,6 @@
 
 }} // namespace boost::proto
 
-#undef CV
-#undef REF
-#undef CVREF
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/deep_copy.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/deep_copy.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/deep_copy.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -14,15 +14,7 @@
 #include <boost/xpressive/proto/expr.hpp>
 #include <boost/xpressive/proto/traits.hpp>
 #include <boost/xpressive/proto/generate.hpp>
-
-#define UNCV(X) \
- typename remove_cv<X>::type
-
-#define UNREF(X) \
- typename remove_reference<X>::type
-
-#define UNCVREF(X) \
- UNCV(UNREF(X))
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -120,8 +112,6 @@
 
 }}
 
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/define.hpp>
 
 #endif // BOOST_PROTO_DEEP_COPY_HPP_EAN_11_21_2006

Added: branches/proto/v3/boost/xpressive/proto/detail/define.hpp
==============================================================================
--- (empty file)
+++ branches/proto/v3/boost/xpressive/proto/detail/define.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -0,0 +1,26 @@
+///////////////////////////////////////////////////////////////////////////////
+/// \file define.hpp
+/// Defines some handy file-scoped macros.
+//
+// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#define CV(T)\
+ typename add_const<T>::type
+
+#define REF(T)\
+ typename add_reference<T>::type
+
+#define CVREF(T)\
+ REF(CV(T))
+
+#define UNCV(T)\
+ typename remove_cv<T>::type
+
+#define UNREF(T)\
+ typename remove_reference<T>::type
+
+#define UNCVREF(T)\
+ UNCV(UNREF(T))
+

Added: branches/proto/v3/boost/xpressive/proto/detail/undef.hpp
==============================================================================
--- (empty file)
+++ branches/proto/v3/boost/xpressive/proto/detail/undef.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -0,0 +1,14 @@
+///////////////////////////////////////////////////////////////////////////////
+/// \file undef.hpp
+/// Undefines the handy file-scoped macros.
+//
+// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#undef CV
+#undef REF
+#undef CVREF
+#undef UNCV
+#undef UNREF
+#undef UNCVREF

Modified: branches/proto/v3/boost/xpressive/proto/eval.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/eval.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/eval.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -10,8 +10,7 @@
 #define BOOST_PROTO_EVAL_HPP_EAN_03_29_2007
 
 #include <boost/type_traits.hpp>
-
-#define UNREF(X) typename remove_reference<X>::type
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -49,6 +48,6 @@
     functional::eval const eval = {};
 }}
 
-#undef UNREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/fusion.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/fusion.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/fusion.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -27,15 +27,7 @@
 #include <boost/fusion/view/ext_/segmented_iterator.hpp>
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/traits.hpp>
-
-#define UNCV(x)\
- typename remove_cv<x>::type
-
-#define UNREF(x)\
- typename remove_reference<x>::type
-
-#define UNCVREF(x)\
- UNCV(UNREF(x))
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -497,8 +489,6 @@
 
 }}
 
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/generate.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/generate.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/generate.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -14,12 +14,7 @@
 #include <boost/utility/enable_if.hpp>
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/matches.hpp>
-
-#define UNREF(X) \
- typename remove_reference<X>::type
-
-#define UNCVREF(X) \
- typename remove_cv<UNREF(X)>::type
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -146,7 +141,6 @@
 
 }}
 
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif // BOOST_PROTO_GENERATE_HPP_EAN_02_13_2007

Modified: branches/proto/v3/boost/xpressive/proto/make_expr.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/make_expr.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/make_expr.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -28,24 +28,7 @@
 #include <boost/fusion/include/front.hpp>
 #include <boost/fusion/include/transform_view.hpp>
 #include <boost/fusion/include/invoke_function_object.hpp>
-
-#define CV(T)\
- typename add_const<T>::type
-
-#define REF(T)\
- typename add_reference<T>::type
-
-#define CVREF(T)\
- REF(CV(T))
-
-#define UNCV(T)\
- typename remove_cv<T>::type
-
-#define UNREF(T)\
- typename remove_reference<T>::type
-
-#define UNCVREF(T)\
- UNCV(UNREF(T))
+#include <boost/xpressive/proto/detail/define.hpp>
 
 /// INTERNAL ONLY
 ///
@@ -780,11 +763,6 @@
 
 }}
 
-#undef CV
-#undef REF
-#undef CVREF
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/matches.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/matches.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/matches.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -24,11 +24,7 @@
 #include <boost/mpl/aux_/template_arity.hpp>
 #include <boost/mpl/aux_/lambda_arity_param.hpp>
 
-#define UNREF(X) \
- typename remove_reference<X>::type
-
-#define UNCVREF(X) \
- typename remove_cv<UNREF(X)>::type
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -593,7 +589,6 @@
 
 }}
 
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/operators.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/operators.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/operators.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -14,8 +14,7 @@
 #include <boost/preprocessor/punctuation/comma.hpp>
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/make_expr.hpp>
-
-#define UNREF(X) typename remove_reference<X>::type
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -335,6 +334,6 @@
 
 }}
 
-#undef UNREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/traits.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/traits.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/traits.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -13,24 +13,7 @@
 #include <boost/mpl/logical.hpp>
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/args.hpp>
-
-#define CV(T)\
- typename add_const<T>::type
-
-#define REF(T)\
- typename add_reference<T>::type
-
-#define CVREF(T)\
- REF(CV(T))
-
-#define UNCV(T)\
- typename remove_cv<T>::type
-
-#define UNREF(T)\
- typename remove_reference<T>::type
-
-#define UNCVREF(T)\
- UNCV(UNREF(T))
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -746,11 +729,6 @@
 
 }}
 
-#undef CV
-#undef REF
-#undef CVREF
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/transform/arg.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/arg.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/arg.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -11,24 +11,7 @@
 
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/traits.hpp>
-
-#define CV(T)\
- typename add_const<T>::type
-
-#define REF(T)\
- typename add_reference<T>::type
-
-#define CVREF(T)\
- REF(CV(T))
-
-#define UNCV(T)\
- typename remove_cv<T>::type
-
-#define UNREF(T)\
- typename remove_reference<T>::type
-
-#define UNCVREF(T)\
- UNCV(UNREF(T))
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -176,11 +159,6 @@
 
 }}
 
-#undef CV
-#undef REF
-#undef CVREF
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/transform/call.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/call.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/call.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -12,24 +12,7 @@
 #include <boost/utility/result_of.hpp>
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/traits.hpp>
-
-#define CV(T)\
- typename add_const<T>::type
-
-#define REF(T)\
- typename add_reference<T>::type
-
-#define CVREF(T)\
- REF(CV(T))
-
-#define UNCV(T)\
- typename remove_cv<T>::type
-
-#define UNREF(T)\
- typename remove_reference<T>::type
-
-#define UNCVREF(T)\
- UNCV(UNREF(T))
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -340,11 +323,6 @@
 
 }}
 
-#undef CV
-#undef REF
-#undef CVREF
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/transform/fold.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/fold.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/fold.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -14,12 +14,7 @@
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/fusion.hpp>
 #include <boost/xpressive/proto/traits.hpp>
-
-#define UNREF(T)\
- typename remove_reference<T>::type
-
-#define UNCVREF(T)\
- typename remove_cv<UNREF(T)>::type
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -125,7 +120,6 @@
 
 }}
 
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #endif

Modified: branches/proto/v3/boost/xpressive/proto/transform/fold_tree.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/fold_tree.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/fold_tree.hpp 2007-12-10 22:45:20 EST (Mon, 10 Dec 2007)
@@ -14,24 +14,7 @@
 #include <boost/xpressive/proto/proto_fwd.hpp>
 #include <boost/xpressive/proto/traits.hpp>
 #include <boost/xpressive/proto/transform/fold.hpp>
-
-#define CV(T)\
- typename add_const<T>::type
-
-#define REF(T)\
- typename add_reference<T>::type
-
-#define CVREF(T)\
- REF(CV(T))
-
-#define UNCV(T)\
- typename remove_cv<T>::type
-
-#define UNREF(T)\
- typename remove_reference<T>::type
-
-#define UNCVREF(T)\
- UNCV(UNREF(T))
+#include <boost/xpressive/proto/detail/define.hpp>
 
 namespace boost { namespace proto
 {
@@ -143,11 +126,6 @@
     {};
 }}
 
-#undef CV
-#undef REF
-#undef CVREF
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
+#include <boost/xpressive/proto/detail/undef.hpp>
 
 #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