mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
fix recursion depth O(logN): some algorithms
This commit is contained in:
parent
28697ee7a8
commit
5019f6aa96
162 changed files with 3600 additions and 1659 deletions
|
@ -10,7 +10,6 @@
|
|||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/algorithm/fixed/result_of.hpp>
|
||||
#include <sprout/detail/container_complate.hpp>
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT
|
||||
|
||||
namespace sprout {
|
||||
namespace fixed {
|
||||
|
@ -30,9 +29,9 @@ namespace sprout {
|
|||
result,
|
||||
sprout::size(result),
|
||||
(Indexes >= offset && Indexes < offset + size && Indexes < offset + input_size
|
||||
? (Indexes < offset + NS_SSCRISK_CEL_OR_SPROUT::distance(middle, last)
|
||||
? (Indexes < offset + sprout::distance(middle, last)
|
||||
? middle[Indexes - offset]
|
||||
: first[(Indexes - offset) - NS_SSCRISK_CEL_OR_SPROUT::distance(first, middle)]
|
||||
: first[(Indexes - offset) - sprout::distance(first, middle)]
|
||||
)
|
||||
: *sprout::next(sprout::internal_begin(result), Indexes)
|
||||
)...
|
||||
|
@ -54,7 +53,7 @@ namespace sprout {
|
|||
sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
|
||||
sprout::internal_begin_offset(result),
|
||||
sprout::size(result),
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)
|
||||
sprout::distance(first, last)
|
||||
);
|
||||
}
|
||||
template<typename ForwardIterator, typename Result, typename... Args>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue