|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61222 - in trunk/libs/spirit/example/scheme: . detail test
From: joel_at_[hidden]
Date: 2010-04-12 04:38:22
Author: djowel
Date: 2010-04-12 04:38:21 EDT (Mon, 12 Apr 2010)
New Revision: 61222
URL: http://svn.boost.org/trac/boost/changeset/61222
Log:
suppressing msvc9 warnings
Text files modified:
trunk/libs/spirit/example/scheme/detail/utree_detail2.hpp | 9 +++++++++
trunk/libs/spirit/example/scheme/scheme_interpreter.hpp | 14 ++++++++++----
trunk/libs/spirit/example/scheme/test/scheme.cpp | 2 +-
trunk/libs/spirit/example/scheme/utree_operators.hpp | 10 ++++++++++
4 files changed, 30 insertions(+), 5 deletions(-)
Modified: trunk/libs/spirit/example/scheme/detail/utree_detail2.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/detail/utree_detail2.hpp (original)
+++ trunk/libs/spirit/example/scheme/detail/utree_detail2.hpp 2010-04-12 04:38:21 EDT (Mon, 12 Apr 2010)
@@ -7,6 +7,11 @@
#if !defined(BOOST_SPIRIT_UTREE_DETAIL2)
#define BOOST_SPIRIT_UTREE_DETAIL2
+#if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable: 4800)
+#endif
+
namespace scheme { namespace detail
{
inline char& fast_string::info()
@@ -960,4 +965,8 @@
}
}
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
#endif
Modified: trunk/libs/spirit/example/scheme/scheme_interpreter.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/scheme_interpreter.hpp (original)
+++ trunk/libs/spirit/example/scheme/scheme_interpreter.hpp 2010-04-12 04:38:21 EDT (Mon, 12 Apr 2010)
@@ -280,8 +280,11 @@
typedef utree result_type;
utree operator()(utree const& args) const
{
- utree result(0);
- BOOST_FOREACH(actor const& element, elements)
+ actor_list::const_iterator i = elements.begin();
+ utree result = (*i++)(args);
+ boost::iterator_range<actor_list::const_iterator>
+ rest(i++, elements.end());
+ BOOST_FOREACH(actor const& element, rest)
{
result = result + element(args);
}
@@ -349,8 +352,11 @@
typedef utree result_type;
utree operator()(utree const& args) const
{
- utree result(1);
- BOOST_FOREACH(actor const& element, elements)
+ actor_list::const_iterator i = elements.begin();
+ utree result = (*i++)(args);
+ boost::iterator_range<actor_list::const_iterator>
+ rest(i++, elements.end());
+ BOOST_FOREACH(actor const& element, rest)
{
result = result * element(args);
}
Modified: trunk/libs/spirit/example/scheme/test/scheme.cpp
==============================================================================
--- trunk/libs/spirit/example/scheme/test/scheme.cpp (original)
+++ trunk/libs/spirit/example/scheme/test/scheme.cpp 2010-04-12 04:38:21 EDT (Mon, 12 Apr 2010)
@@ -82,7 +82,7 @@
compile_all(program, env, flist, fragments);
BOOST_FOREACH(scheme::actor const& f, flist)
{
- std::cout << " result: " << f() << std::endl;
+ std::cout << "result: " << f() << std::endl;
}
}
else
Modified: trunk/libs/spirit/example/scheme/utree_operators.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/utree_operators.hpp (original)
+++ trunk/libs/spirit/example/scheme/utree_operators.hpp 2010-04-12 04:38:21 EDT (Mon, 12 Apr 2010)
@@ -7,6 +7,12 @@
#if !defined(BOOST_SPIRIT_UTREE_OPERATORS)
#define BOOST_SPIRIT_UTREE_OPERATORS
+#if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable: 4804)
+# pragma warning(disable: 4805)
+#endif
+
#include "utree.hpp"
#include <boost/preprocessor/cat.hpp>
#include <boost/type_traits/is_arithmetic.hpp>
@@ -516,4 +522,8 @@
}
}
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
#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