mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-02 14:04:20 +00:00
fix recursion depth: cstring algorithm
This commit is contained in:
parent
f26032dce8
commit
b51b14efa9
25 changed files with 792 additions and 142 deletions
|
@ -56,7 +56,7 @@ namespace sprout {
|
|||
|
||||
template<typename ForwardIterator1>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator1, bool>
|
||||
search_impl_check(sprout::pair<ForwardIterator1, bool> const& current, ForwardIterator1 last1, ForwardIterator1 searched) {
|
||||
search_impl_fork(sprout::pair<ForwardIterator1, bool> const& current, ForwardIterator1 last1, ForwardIterator1 searched) {
|
||||
typedef sprout::pair<ForwardIterator1, bool> type;
|
||||
return searched == current.first || searched == last1 ? type(searched, true)
|
||||
: type(sprout::next(current.first), false)
|
||||
|
@ -72,7 +72,7 @@ namespace sprout {
|
|||
{
|
||||
typedef sprout::pair<ForwardIterator1, bool> type;
|
||||
return current.second || current.first == last1 ? current
|
||||
: n == 1 ? sprout::detail::search_impl_check(
|
||||
: n == 1 ? sprout::detail::search_impl_fork(
|
||||
current, last1,
|
||||
sprout::detail::search_one(current.first, last1, first2, last2, pred)
|
||||
)
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace sprout {
|
|||
template<typename InputIterator1, typename InputIterator2, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
||||
tristate_lexicographical_compare_impl_1(
|
||||
sprout::pair<InputIterator1, InputIterator2> current,
|
||||
sprout::pair<InputIterator1, InputIterator2> const& current,
|
||||
InputIterator1 last1, InputIterator2 last2, Compare comp,
|
||||
typename std::iterator_traits<InputIterator1>::difference_type n
|
||||
)
|
||||
|
@ -109,7 +109,7 @@ namespace sprout {
|
|||
template<typename InputIterator1, typename InputIterator2, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
||||
tristate_lexicographical_compare_impl(
|
||||
sprout::pair<InputIterator1, InputIterator2> current,
|
||||
sprout::pair<InputIterator1, InputIterator2> const& current,
|
||||
InputIterator1 last1, InputIterator2 last2, Compare comp,
|
||||
typename std::iterator_traits<InputIterator1>::difference_type n
|
||||
)
|
||||
|
@ -252,7 +252,7 @@ namespace sprout {
|
|||
template<typename InputIterator1, typename T1, typename InputIterator2, typename T2, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
||||
tristate_lexicographical_compare_impl_1(
|
||||
sprout::pair<InputIterator1, InputIterator2> current,
|
||||
sprout::pair<InputIterator1, InputIterator2> const& current,
|
||||
InputIterator1 last1, T1 const& delim1, InputIterator2 last2, T2 const& delim2, Compare comp,
|
||||
typename std::iterator_traits<InputIterator1>::difference_type n
|
||||
)
|
||||
|
@ -276,7 +276,7 @@ namespace sprout {
|
|||
template<typename InputIterator1, typename T1, typename InputIterator2, typename T2, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
||||
tristate_lexicographical_compare_impl(
|
||||
sprout::pair<InputIterator1, InputIterator2> current,
|
||||
sprout::pair<InputIterator1, InputIterator2> const& current,
|
||||
InputIterator1 last1, T1 const& delim1, InputIterator2 last2, T2 const& delim2, Compare comp,
|
||||
typename std::iterator_traits<InputIterator1>::difference_type n
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue