mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
range/numeric.hpp 追加
algorithm/* fix
This commit is contained in:
parent
510a265ea5
commit
42d73cc4d5
18 changed files with 407 additions and 131 deletions
|
@ -1,11 +1,12 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_REMOVE_COPY_IF_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_REMOVE_COPY_IF_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/algorithm/fixed/result_of.hpp>
|
||||
|
||||
namespace sprout {
|
||||
|
@ -61,7 +62,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return first != last && sizeof...(Args) < offset
|
||||
return first != last && sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? pred(*first)
|
||||
? remove_copy_if_impl_2(sprout::next(first), last, result, pred, offset, args...)
|
||||
: remove_copy_if_impl_2(sprout::next(first), last, result, pred, offset, args..., *first)
|
||||
|
@ -96,7 +97,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? remove_copy_if_impl_1(first, last, result, pred, offset, args..., *sprout::next(sprout::fixed_begin(result), sizeof...(Args)))
|
||||
: remove_copy_if_impl_2(first, last, result, pred, offset + sprout::size(result), args...)
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue