|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56841 - trunk/boost/spirit/home/lex/lexer/lexertl
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-14 15:06:18
Author: hkaiser
Date: 2009-10-14 15:06:18 EDT (Wed, 14 Oct 2009)
New Revision: 56841
URL: http://svn.boost.org/trac/boost/changeset/56841
Log:
Spirit: fixing workarounds for VC7.1
Text files modified:
trunk/boost/spirit/home/lex/lexer/lexertl/lexer.hpp | 4 ++--
trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
Modified: trunk/boost/spirit/home/lex/lexer/lexertl/lexer.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/lexer.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/lexer.hpp 2009-10-14 15:06:18 EDT (Wed, 14 Oct 2009)
@@ -149,8 +149,8 @@
typedef void (dummy::*safe_bool)();
public:
- operator safe_bool () const
- { return !initialized_dfa_ ? 0 : &dummy::true_; }
+ operator safe_bool() const
+ { return initialized_dfa_ ? &dummy::true_ : 0; }
typedef typename boost::detail::iterator_traits<Iterator>::value_type
char_type;
Modified: trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp 2009-10-14 15:06:18 EDT (Wed, 14 Oct 2009)
@@ -11,6 +11,7 @@
#endif
#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
#include <boost/spirit/home/qi/detail/assign_to.hpp>
#include <boost/spirit/home/support/attributes.hpp>
#include <boost/spirit/home/support/argument.hpp>
@@ -160,14 +161,13 @@
#endif
// works only starting MSVC V8
-#if BOOST_MSVC >= 1500
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
private:
struct dummy { void true_() {}; };
typedef void (dummy::*safe_bool)();
public:
- operator safe_bool () const
- { return !is_valid() ? 0 : &dummy::true_; }
+ operator safe_bool() const { return is_valid() ? &dummy::true_ : 0; }
#endif
protected:
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