summaryrefslogtreecommitdiff
path: root/boost/fusion/sequence/comparison/detail/greater.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/sequence/comparison/detail/greater.hpp')
-rw-r--r--boost/fusion/sequence/comparison/detail/greater.hpp6
1 files changed, 4 insertions, 2 deletions
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>