Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59486 - trunk/boost/spirit/home/support/iterators
From: hartmut.kaiser_at_[hidden]
Date: 2010-02-04 19:17:40


Author: hkaiser
Date: 2010-02-04 19:17:40 EST (Thu, 04 Feb 2010)
New Revision: 59486
URL: http://svn.boost.org/trac/boost/changeset/59486

Log:
Spirit: adding workaround for MSVC falsly trzing to use multi_pass::operator== for other iterators
Text files modified:
   trunk/boost/spirit/home/support/iterators/multi_pass.hpp | 46 ++++++++++++++-------------------------
   1 files changed, 17 insertions(+), 29 deletions(-)

Modified: trunk/boost/spirit/home/support/iterators/multi_pass.hpp
==============================================================================
--- trunk/boost/spirit/home/support/iterators/multi_pass.hpp (original)
+++ trunk/boost/spirit/home/support/iterators/multi_pass.hpp 2010-02-04 19:17:40 EST (Thu, 04 Feb 2010)
@@ -155,6 +155,23 @@
             return policies_base_type::less_than(*this, y);
         }
 
+ bool operator!=(multi_pass const& y)
+ {
+ return !(*this == y);
+ }
+ bool operator>(multi_pass const& y)
+ {
+ return y < *this;
+ }
+ bool operator>=(multi_pass const& y)
+ {
+ return !(*this < y);
+ }
+ bool operator<=(multi_pass const& y)
+ {
+ return !(y < *this);
+ }
+
         // allow access to base member
         shared_data_type* shared() const { return this->member; }
 
@@ -165,35 +182,6 @@
         }
     };
 
-
- template <typename T, typename Policies>
- inline bool
- operator!=(multi_pass<T, Policies> const& x, multi_pass<T, Policies> const& y)
- {
- return !(x == y);
- }
-
- template <typename T, typename Policies>
- inline bool
- operator>(multi_pass<T, Policies> const& x, multi_pass<T, Policies> const& y)
- {
- return y < x;
- }
-
- template <typename T, typename Policies>
- inline bool
- operator>=(multi_pass<T, Policies> const& x, multi_pass<T, Policies> const& y)
- {
- return !(x < y);
- }
-
- template <typename T, typename Policies>
- inline bool
- operator<=(multi_pass<T, Policies> const& x, multi_pass<T, Policies> const& y)
- {
- return !(y < x);
- }
-
     ///////////////////////////////////////////////////////////////////////////
     // Generator function
     ///////////////////////////////////////////////////////////////////////////


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