summaryrefslogtreecommitdiff
path: root/boost/algorithm/cxx14
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-08 03:09:47 +0000
committer <>2015-05-05 14:37:32 +0000
commitf2541bb90af059680aa7036f315f052175999355 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /boost/algorithm/cxx14
parented232fdd34968697a68783b3195b1da4226915b5 (diff)
downloadboost-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'boost/algorithm/cxx14')
-rw-r--r--boost/algorithm/cxx14/is_permutation.hpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/boost/algorithm/cxx14/is_permutation.hpp b/boost/algorithm/cxx14/is_permutation.hpp
index d8002cbce..9346881af 100644
--- a/boost/algorithm/cxx14/is_permutation.hpp
+++ b/boost/algorithm/cxx14/is_permutation.hpp
@@ -22,7 +22,6 @@
namespace boost { namespace algorithm {
-#if __cplusplus <= 201103L
/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last,
/// ForwardIterator2 first2, ForwardIterator2 last2 )
/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2
@@ -40,10 +39,10 @@ bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
{
// How should I deal with the idea that ForwardIterator1::value_type
// and ForwardIterator2::value_type could be different? Define my own comparison predicate?
- std::pair<ForwardIterator1, ForwardIterator2> eq = boost::algorithm::mismatch
- ( first1, last1, first2, last2 );
- if ( eq.first == last1 && eq.second == last2)
- return true;
+ std::pair<ForwardIterator1, ForwardIterator2> eq = boost::algorithm::mismatch
+ ( first1, last1, first2, last2 );
+ if ( eq.first == last1 && eq.second == last2)
+ return true;
return boost::algorithm::detail::is_permutation_tag (
eq.first, last1, eq.second, last2,
std::equal_to<typename std::iterator_traits<ForwardIterator1>::value_type> (),
@@ -70,16 +69,15 @@ bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred )
{
- std::pair<ForwardIterator1, ForwardIterator2> eq = boost::algorithm::mismatch
- ( first1, last1, first2, last2, pred );
- if ( eq.first == last1 && eq.second == last2)
- return true;
+ std::pair<ForwardIterator1, ForwardIterator2> eq = boost::algorithm::mismatch
+ ( first1, last1, first2, last2, pred );
+ if ( eq.first == last1 && eq.second == last2)
+ return true;
return boost::algorithm::detail::is_permutation_tag (
first1, last1, first2, last2, pred,
typename std::iterator_traits<ForwardIterator1>::iterator_category (),
typename std::iterator_traits<ForwardIterator2>::iterator_category ());
}
-#endif
}}