summaryrefslogtreecommitdiff
path: root/boost/fusion/sequence
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/sequence')
-rw-r--r--boost/fusion/sequence/comparison/detail/equal_to.hpp3
-rw-r--r--boost/fusion/sequence/comparison/detail/greater.hpp6
-rw-r--r--boost/fusion/sequence/comparison/detail/greater_equal.hpp6
-rw-r--r--boost/fusion/sequence/comparison/detail/less.hpp6
-rw-r--r--boost/fusion/sequence/comparison/detail/less_equal.hpp6
-rw-r--r--boost/fusion/sequence/comparison/detail/not_equal_to.hpp3
6 files changed, 20 insertions, 10 deletions
diff --git a/boost/fusion/sequence/comparison/detail/equal_to.hpp b/boost/fusion/sequence/comparison/detail/equal_to.hpp
index 3e15e63ae5..56cfe1b247 100644
--- a/boost/fusion/sequence/comparison/detail/equal_to.hpp
+++ b/boost/fusion/sequence/comparison/detail/equal_to.hpp
@@ -12,6 +12,7 @@
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/as_const.hpp>
namespace boost { namespace fusion { namespace detail
{
@@ -32,7 +33,7 @@ namespace boost { namespace fusion { namespace detail
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
- return *a == *b
+ return extension::as_const(*a) == extension::as_const(*b)
&& call(fusion::next(a), fusion::next(b));
}
diff --git a/boost/fusion/sequence/comparison/detail/greater.hpp b/boost/fusion/sequence/comparison/detail/greater.hpp
index b4c4b087a6..e61287765f 100644
--- a/boost/fusion/sequence/comparison/detail/greater.hpp
+++ b/boost/fusion/sequence/comparison/detail/greater.hpp
@@ -12,6 +12,7 @@
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/as_const.hpp>
namespace boost { namespace fusion { namespace detail
{
@@ -32,8 +33,9 @@ namespace boost { namespace fusion { namespace detail
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
- return *a > *b ||
- (!(*b > *a) && call(fusion::next(a), fusion::next(b)));
+ return extension::as_const(*a) > extension::as_const(*b) ||
+ (!(extension::as_const(*b) > extension::as_const(*a)) &&
+ call(fusion::next(a), fusion::next(b)));
}
template <typename I1, typename I2>
diff --git a/boost/fusion/sequence/comparison/detail/greater_equal.hpp b/boost/fusion/sequence/comparison/detail/greater_equal.hpp
index f3eccd5d55..6d91e27bbd 100644
--- a/boost/fusion/sequence/comparison/detail/greater_equal.hpp
+++ b/boost/fusion/sequence/comparison/detail/greater_equal.hpp
@@ -12,6 +12,7 @@
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/as_const.hpp>
namespace boost { namespace fusion { namespace detail
{
@@ -32,8 +33,9 @@ namespace boost { namespace fusion { namespace detail
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
- return *a >= *b
- && (!(*b >= *a) || call(fusion::next(a), fusion::next(b)));
+ return extension::as_const(*a) >= extension::as_const(*b)
+ && (!(extension::as_const(*b) >= extension::as_const(*a)) ||
+ call(fusion::next(a), fusion::next(b)));
}
template <typename I1, typename I2>
diff --git a/boost/fusion/sequence/comparison/detail/less.hpp b/boost/fusion/sequence/comparison/detail/less.hpp
index 4957d7bfa8..1342bb1427 100644
--- a/boost/fusion/sequence/comparison/detail/less.hpp
+++ b/boost/fusion/sequence/comparison/detail/less.hpp
@@ -12,6 +12,7 @@
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/as_const.hpp>
namespace boost { namespace fusion { namespace detail
{
@@ -32,8 +33,9 @@ namespace boost { namespace fusion { namespace detail
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
- return *a < *b ||
- (!(*b < *a) && call(fusion::next(a), fusion::next(b)));
+ return extension::as_const(*a) < extension::as_const(*b) ||
+ (!(extension::as_const(*b) < extension::as_const(*a)) &&
+ call(fusion::next(a), fusion::next(b)));
}
template <typename I1, typename I2>
diff --git a/boost/fusion/sequence/comparison/detail/less_equal.hpp b/boost/fusion/sequence/comparison/detail/less_equal.hpp
index 08fe9ec389..5683849a2c 100644
--- a/boost/fusion/sequence/comparison/detail/less_equal.hpp
+++ b/boost/fusion/sequence/comparison/detail/less_equal.hpp
@@ -12,6 +12,7 @@
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/as_const.hpp>
namespace boost { namespace fusion { namespace detail
{
@@ -32,8 +33,9 @@ namespace boost { namespace fusion { namespace detail
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
- return *a <= *b
- && (!(*b <= *a) || call(fusion::next(a), fusion::next(b)));
+ return extension::as_const(*a) <= extension::as_const(*b)
+ && (!(extension::as_const(*b) <= extension::as_const(*a)) ||
+ call(fusion::next(a), fusion::next(b)));
}
template <typename I1, typename I2>
diff --git a/boost/fusion/sequence/comparison/detail/not_equal_to.hpp b/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
index ac54dfb7d4..77c235089f 100644
--- a/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
+++ b/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
@@ -12,6 +12,7 @@
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/as_const.hpp>
namespace boost { namespace fusion { namespace detail
{
@@ -32,7 +33,7 @@ namespace boost { namespace fusion { namespace detail
static bool
call(I1 const& a, I2 const& b, mpl::false_)
{
- return *a != *b
+ return extension::as_const(*a) != extension::as_const(*b)
|| call(fusion::next(a), fusion::next(b));
}