Update of /cvsroot/boost/boost/boost/wave
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27052/boost/wave

Modified Files:
        preprocessing_hooks.hpp wave_config.hpp 
Log Message:
Wave: Changed return type of some preprocessing hooks to allow to skip the 
corresponding preprocessor action.

Index: preprocessing_hooks.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/wave/preprocessing_hooks.hpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- preprocessing_hooks.hpp     20 May 2007 00:28:20 -0000      1.20
+++ preprocessing_hooks.hpp     4 Jul 2007 21:56:55 -0000       1.21
@@ -56,6 +56,11 @@
     //  invocation (starting with the opening parenthesis and ending after the
     //  closing one).
     //
+    //  The return value defines, whether the corresponding macro will be 
+    //  expanded (return false) or will be copied to the output (return true).
+    //  Note: the whole argument list is copied unchanged to the output as well
+    //        without any further processing.
+    //
     ///////////////////////////////////////////////////////////////////////////
 
 #if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
@@ -69,12 +74,13 @@
 #else
     // new signature
     template <typename ContextT, typename TokenT, typename ContainerT, 
typename IteratorT>
-    void expanding_function_like_macro(ContextT const& ctx,
+    bool 
+    expanding_function_like_macro(ContextT const& ctx,
         TokenT const& macrodef, std::vector<TokenT> const& formal_args, 
         ContainerT const& definition,
         TokenT const& macrocall, std::vector<ContainerT> const& arguments,
         IteratorT const& seqstart, IteratorT const& seqend) 
-    {}
+    { return false; }   // default is to normally expand the macro
 #endif
 
     ///////////////////////////////////////////////////////////////////////////
@@ -93,6 +99,9 @@
     //
     //  The parameter 'macrocall' marks the position, where this macro invoked.
     //
+    //  The return value defines, whether the corresponding macro will be 
+    //  expanded (return false) or will be copied to the output (return true).
+    //
     ///////////////////////////////////////////////////////////////////////////
 #if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
     // old signature
@@ -103,9 +112,10 @@
 #else
     // new signature
     template <typename ContextT, typename TokenT, typename ContainerT>
-    void expanding_object_like_macro(ContextT const& ctx, TokenT const& macro, 
+    bool 
+    expanding_object_like_macro(ContextT const& ctx, TokenT const& macro, 
         ContainerT const& definition, TokenT const& macrocall)
-    {}
+    { return false; }   // default is to normally expand the macro
 #endif
 
     ///////////////////////////////////////////////////////////////////////////
@@ -176,7 +186,7 @@
     //  preprocessing constant was defined to something != 0.
     //
     //  The return value defines, whether the found file will be included 
-    //  (return true) or will be skipped (return false),
+    //  (return false) or will be skipped (return true).
     //
     ///////////////////////////////////////////////////////////////////////////
 #if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
@@ -191,7 +201,7 @@
     found_include_directive(ContextT const& ctx, std::string const& filename, 
         bool include_next) 
     {
-        return true;    // ok to include this file
+        return false;    // ok to include this file
     }
 #endif
     
@@ -371,6 +381,11 @@
     //  The parameter 'directive' is a reference to the token holding the 
     //  preprocessing directive.
     //
+    //  The return value defines, whether the given expression has to be 
+    //  to be executed in a normal way (return 'false'), or if it has to be  
+    //  skipped altogether (return 'true'), which means it gets replaced in 
the 
+    //  output by a single newline.
+    //
     ///////////////////////////////////////////////////////////////////////////
 #if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
     // old signature
@@ -381,9 +396,9 @@
 #else
     // new signature
     template <typename ContextT, typename TokenT>
-    void
+    bool
     found_directive(ContextT const& ctx, TokenT const& directive)
-    {}
+    { return false; }   // by default we never skip any directives
 #endif
 
     ///////////////////////////////////////////////////////////////////////////

Index: wave_config.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/wave/wave_config.hpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- wave_config.hpp     4 Jul 2007 18:25:51 -0000       1.20
+++ wave_config.hpp     4 Jul 2007 21:56:55 -0000       1.21
@@ -393,6 +393,9 @@
 #if defined(BOOST_HAS_THREADS)
 #define BOOST_SPIRIT_THREADSAFE 1
 #define PHOENIX_THREADSAFE 1
+#else
+// disable thread support in Boost.Pool
+#define BOOST_NO_MT 1
 #endif
 
 ///////////////////////////////////////////////////////////////////////////////


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to