mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
algorithm を next/prev で再実装
This commit is contained in:
parent
6fe7e88509
commit
628d1caa7e
50 changed files with 310 additions and 189 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
|
@ -40,10 +41,10 @@ namespace sprout {
|
|||
sprout::size(cont) + sprout::size(input),
|
||||
(Indexes < sprout::fixed_container_traits<Container>::fixed_size + size
|
||||
? (Indexes < pos
|
||||
? *(sprout::fixed_begin(cont) + Indexes)
|
||||
? *sprout::next(sprout::fixed_begin(cont), Indexes)
|
||||
: Indexes < pos + size
|
||||
? *(sprout::begin(input) + Indexes - pos)
|
||||
: *(sprout::fixed_begin(cont) + Indexes - size)
|
||||
? *sprout::next(sprout::begin(input), Indexes - pos)
|
||||
: *sprout::next(sprout::fixed_begin(cont), Indexes - size)
|
||||
)
|
||||
: typename sprout::fixed_container_traits<Result>::value_type()
|
||||
)...
|
||||
|
@ -81,7 +82,7 @@ namespace sprout {
|
|||
return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append<Container, Input>::type>(
|
||||
cont,
|
||||
typename sprout::index_range<0, sprout::fixed_container_traits<typename sprout::fixed::result_of::append<Container, Input>::type>::fixed_size>::type(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::fixed_begin(cont), sprout::begin(cont) + pos),
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::fixed_begin(cont), sprout::next(sprout::begin(cont), pos)),
|
||||
sprout::size(input),
|
||||
input
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue