|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73698 - trunk/boost/fusion/algorithm/transformation
From: joel_at_[hidden]
Date: 2011-08-12 08:07:38
Author: djowel
Date: 2011-08-12 08:07:36 EDT (Fri, 12 Aug 2011)
New Revision: 73698
URL: http://svn.boost.org/trac/boost/changeset/73698
Log:
Better is_equal test
Text files modified:
trunk/boost/fusion/algorithm/transformation/pop_back.hpp | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
Modified: trunk/boost/fusion/algorithm/transformation/pop_back.hpp
==============================================================================
--- trunk/boost/fusion/algorithm/transformation/pop_back.hpp (original)
+++ trunk/boost/fusion/algorithm/transformation/pop_back.hpp 2011-08-12 08:07:36 EDT (Fri, 12 Aug 2011)
@@ -47,14 +47,22 @@
}
};
+ template <typename I, bool IsLast_>
+ struct equal_to_helper
+ : mpl::identity<typename I::iterator_base_type>
+ {};
+
+ template <typename I>
+ struct equal_to_helper<I, true>
+ : result_of::next<
+ typename I::iterator_base_type>
+ {};
+
template <typename I1, typename I2>
struct equal_to
: result_of::equal_to<
- typename mpl::if_c<(I1::is_last|I2::is_last)
- , typename result_of::next<
- typename I1::iterator_base_type>::type
- , typename I1::iterator_base_type>::type
- , typename I2::iterator_base_type
+ typename equal_to_helper<I1, I2::is_last>::type
+ , typename equal_to_helper<I2, I1::is_last>::type
>
{};
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