mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
algorithm, operation 全面修正
This commit is contained in:
parent
21f5d5191a
commit
5e67195030
244 changed files with 4764 additions and 831 deletions
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
static_assert(sprout::fixed_container_traits<Container>::fixed_size >= 1, "fixed_size >= 1");
|
||||
public:
|
||||
typedef typename sprout::rebind_fixed_size<
|
||||
typename sprout::fixed_container_traits<Container>::fixed_container_type
|
||||
Container
|
||||
>::template apply<
|
||||
sprout::fixed_container_traits<Container>::fixed_size - 1
|
||||
>::type type;
|
||||
|
@ -34,15 +34,17 @@ namespace sprout {
|
|||
typename sprout::fixed_container_traits<Container>::difference_type pos
|
||||
)
|
||||
{
|
||||
return Result{
|
||||
return sprout::remake_clone<Result, Container>(
|
||||
cont,
|
||||
sprout::size(cont) - 1,
|
||||
(Indexes < sprout::fixed_container_traits<Container>::fixed_size - 1
|
||||
? (Indexes < pos
|
||||
? *(sprout::fixed_begin(cont) + Indexes)
|
||||
: *(sprout::fixed_begin(cont) + Indexes + 1)
|
||||
)
|
||||
: typename sprout::fixed_container_traits<Result>::value_type{}
|
||||
: typename sprout::fixed_container_traits<Result>::value_type()
|
||||
)...
|
||||
};
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
|
@ -76,6 +78,12 @@ namespace sprout {
|
|||
);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
namespace result_of {
|
||||
using sprout::fixed::result_of::erase;
|
||||
} // namespace result_of
|
||||
|
||||
using sprout::fixed::erase;
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIXED_ERASE_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue