mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2024-11-12 21:09:01 +00:00
fix algorithm
This commit is contained in:
parent
5019f6aa96
commit
bb59363682
6 changed files with 19 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
|||
#define SPROUT_ALGORITHM_ADJACENT_FIND_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/iterator/type_traits/is_iterator.hpp>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define SPROUT_ALGORITHM_EQUAL_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/iterator/type_traits/common.hpp>
|
||||
|
@ -29,7 +30,10 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::is_constant_distance_iterator<RandomAccessIterator1>::value && sprout::is_constant_distance_iterator<RandomAccessIterator2>::value,
|
||||
bool
|
||||
>::type
|
||||
equal(
|
||||
RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, BinaryPredicate pred,
|
||||
std::random_access_iterator_tag*
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIND_END_HPP
|
||||
#define SPROUT_ALGORITHM_FIND_END_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/iterator/type_traits/is_iterator.hpp>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define SPROUT_ALGORITHM_FIND_FIRST_OF_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/iterator/type_traits/is_iterator.hpp>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define SPROUT_ALGORITHM_IS_PERMUTATION_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/iterator/type_traits/common.hpp>
|
||||
|
@ -35,7 +36,10 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::is_constant_distance_iterator<RandomAccessIterator1>::value && sprout::is_constant_distance_iterator<RandomAccessIterator2>::value,
|
||||
bool
|
||||
>::type
|
||||
is_permutation(
|
||||
RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, BinaryPredicate pred,
|
||||
std::random_access_iterator_tag*
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define SPROUT_ALGORITHM_MISMATCH_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/iterator/type_traits/common.hpp>
|
||||
|
@ -39,7 +40,10 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<RandomAccessIterator1, RandomAccessIterator2>
|
||||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::is_constant_distance_iterator<RandomAccessIterator1>::value && sprout::is_constant_distance_iterator<RandomAccessIterator2>::value,
|
||||
sprout::pair<RandomAccessIterator1, RandomAccessIterator2>
|
||||
>::type
|
||||
mismatch(
|
||||
RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, BinaryPredicate pred,
|
||||
std::random_access_iterator_tag*
|
||||
|
|
Loading…
Reference in a new issue