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
|
@ -7,6 +7,7 @@
|
|||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/detail/param_at.hpp>
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
|
@ -42,10 +43,10 @@ namespace sprout {
|
|||
sprout::size(cont) + 1 + sizeof...(Values),
|
||||
(Indexes < sprout::fixed_container_traits<Container>::fixed_size + 1 + sizeof...(Values)
|
||||
? (Indexes < pos
|
||||
? *(sprout::fixed_begin(cont) + Indexes)
|
||||
? *sprout::next(sprout::fixed_begin(cont), Indexes)
|
||||
: Indexes < pos + 1 + sizeof...(Values)
|
||||
? sprout::detail::param_at<typename sprout::fixed_container_traits<Result>::value_type>(Indexes - pos, v, values...)
|
||||
: *(sprout::fixed_begin(cont) + Indexes - (1 + sizeof...(Values)))
|
||||
: *sprout::next(sprout::fixed_begin(cont), Indexes - (1 + sizeof...(Values)))
|
||||
)
|
||||
: typename sprout::fixed_container_traits<Result>::value_type()
|
||||
)...
|
||||
|
@ -85,7 +86,7 @@ namespace sprout {
|
|||
return sprout::fixed::detail::insert_impl<typename sprout::fixed::result_of::insert<Container, T, Values...>::type>(
|
||||
cont,
|
||||
typename sprout::index_range<0, sprout::fixed_container_traits<typename sprout::fixed::result_of::insert<Container, T, Values...>::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)),
|
||||
v,
|
||||
values...
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue