Update of /cvsroot/boost/boost/libs/spirit/example/fundamental
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv975
Modified Files:
Tag: SPIRIT_1_6
regex_convert.cpp
Log Message:
Added workaround for unsupported Boost.Function syntax
Index: regex_convert.cpp
===================================================================
RCS file:
/cvsroot/boost/boost/libs/spirit/example/fundamental/Attic/regex_convert.cpp,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -d -r1.5.2.3 -r1.5.2.4
--- regex_convert.cpp 25 Nov 2004 11:14:35 -0000 1.5.2.3
+++ regex_convert.cpp 26 Feb 2007 23:50:31 -0000 1.5.2.4
@@ -36,18 +36,14 @@
#include <boost/function.hpp>
#include <boost/spirit/core.hpp>
+#include <boost/detail/workaround.hpp>
+
///////////////////////////////////////////////////////////////////////////////
//
// The following header must be included, if regular expression support is
// required for Spirit.
//
-// The BOOST_SPIRIT_NO_REGEX_LIB PP constant should be defined, if you're
using the
-// Boost.Regex library from one translation unit only. Otherwise you have to
-// link with the Boost.Regex library as defined in the related documentation
-// (see. http://www.boost.org).
-//
///////////////////////////////////////////////////////////////////////////////
-#define BOOST_SPIRIT_NO_REGEX_LIB
#include <boost/spirit/utility/regex.hpp>
using namespace boost::spirit;
@@ -87,7 +83,11 @@
struct emit_modified_subscript
{
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) ||
BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+ emit_modified_subscript(boost::function1<long, long> const &f)
+#else
emit_modified_subscript(boost::function<long (long)> const &f)
+#endif
: modifier(f)
{}
@@ -106,7 +106,11 @@
private:
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) ||
BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+ boost::function1<long, long> modifier;
+#else
boost::function<long (long)> modifier;
+#endif
};
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs