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 <sprout/operation/fixed/resize.hpp>
|
||||
|
||||
namespace sprout {
|
||||
|
@ -32,7 +33,7 @@ namespace sprout {
|
|||
{
|
||||
return sprout::make_clone<Result>(
|
||||
(Indexes >= offset && Indexes < offset + size
|
||||
? *(sprout::begin(cont) + Indexes - offset)
|
||||
? *sprout::next(sprout::begin(cont), Indexes - offset)
|
||||
: v
|
||||
)...
|
||||
);
|
||||
|
@ -70,7 +71,7 @@ namespace sprout {
|
|||
{
|
||||
return sprout::make_clone<Result>(
|
||||
(Indexes >= offset && Indexes < offset + size
|
||||
? *(sprout::begin(cont) + Indexes - offset)
|
||||
? *sprout::next(sprout::begin(cont), Indexes - offset)
|
||||
: typename sprout::fixed_container_traits<Result>::value_type()
|
||||
)...
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue