mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
algorithm, operation 全面修正
This commit is contained in:
parent
21f5d5191a
commit
5e67195030
244 changed files with 4764 additions and 831 deletions
|
@ -5,6 +5,7 @@
|
|||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/result_of.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fixed {
|
||||
|
@ -12,18 +13,18 @@ namespace sprout {
|
|||
template<typename Result, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename std::enable_if<
|
||||
sprout::fixed_container_traits<Result>::fixed_size == sizeof...(Args),
|
||||
typename sprout::fixed_container_traits<Result>::fixed_container_type
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type stable_partition_copy_impl_4(
|
||||
Result const& result,
|
||||
Args const&... args
|
||||
)
|
||||
{
|
||||
return typename sprout::fixed_container_traits<Result>::fixed_container_type{args...};
|
||||
return sprout::remake_clone<Result, Result>(result, sprout::size(result), args...);
|
||||
}
|
||||
template<typename Result, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename std::enable_if<
|
||||
sprout::fixed_container_traits<Result>::fixed_size != sizeof...(Args),
|
||||
typename sprout::fixed_container_traits<Result>::fixed_container_type
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type stable_partition_copy_impl_4(
|
||||
Result const& result,
|
||||
Args const&... args
|
||||
|
@ -35,7 +36,7 @@ namespace sprout {
|
|||
template<typename Iterator, typename Result, typename Predicate, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename std::enable_if<
|
||||
sprout::fixed_container_traits<Result>::fixed_size == sizeof...(Args),
|
||||
typename sprout::fixed_container_traits<Result>::fixed_container_type
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type stable_partition_copy_impl_3(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
|
@ -45,12 +46,12 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return typename sprout::fixed_container_traits<Result>::fixed_container_type{args...};
|
||||
return sprout::remake_clone<Result, Result>(result, sprout::size(result), args...);
|
||||
}
|
||||
template<typename Iterator, typename Result, typename Predicate, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename std::enable_if<
|
||||
sprout::fixed_container_traits<Result>::fixed_size != sizeof...(Args),
|
||||
typename sprout::fixed_container_traits<Result>::fixed_container_type
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type stable_partition_copy_impl_3(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
|
@ -71,7 +72,7 @@ namespace sprout {
|
|||
template<typename Iterator, typename Result, typename Predicate, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename std::enable_if<
|
||||
sprout::fixed_container_traits<Result>::fixed_size == sizeof...(Args),
|
||||
typename sprout::fixed_container_traits<Result>::fixed_container_type
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type stable_partition_copy_impl_2(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
|
@ -82,12 +83,12 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return typename sprout::fixed_container_traits<Result>::fixed_container_type{args...};
|
||||
return sprout::remake_clone<Result, Result>(result, sprout::size(result), args...);
|
||||
}
|
||||
template<typename Iterator, typename Result, typename Predicate, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename std::enable_if<
|
||||
sprout::fixed_container_traits<Result>::fixed_size != sizeof...(Args),
|
||||
typename sprout::fixed_container_traits<Result>::fixed_container_type
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type stable_partition_copy_impl_2(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
|
@ -108,7 +109,7 @@ namespace sprout {
|
|||
template<typename Iterator, typename Result, typename Predicate, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename std::enable_if<
|
||||
sprout::fixed_container_traits<Result>::fixed_size == sizeof...(Args),
|
||||
typename sprout::fixed_container_traits<Result>::fixed_container_type
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type stable_partition_copy_impl_1(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
|
@ -119,12 +120,12 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return typename sprout::fixed_container_traits<Result>::fixed_container_type{args...};
|
||||
return sprout::remake_clone<Result, Result>(result, sprout::size(result), args...);
|
||||
}
|
||||
template<typename Iterator, typename Result, typename Predicate, typename... Args>
|
||||
SPROUT_CONSTEXPR inline typename std::enable_if<
|
||||
sprout::fixed_container_traits<Result>::fixed_size != sizeof...(Args),
|
||||
typename sprout::fixed_container_traits<Result>::fixed_container_type
|
||||
typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
>::type stable_partition_copy_impl_1(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
|
@ -141,7 +142,7 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<Result>::fixed_container_type stable_partition_copy_impl(
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type stable_partition_copy_impl(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
|
@ -155,7 +156,7 @@ namespace sprout {
|
|||
// stable_partition_copy
|
||||
//
|
||||
template<typename Iterator, typename Result, typename Predicate>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<Result>::fixed_container_type stable_partition_copy(
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type stable_partition_copy(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Result const& result,
|
||||
|
@ -165,6 +166,8 @@ namespace sprout {
|
|||
return sprout::fixed::detail::stable_partition_copy_impl(first, last, result, pred);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::fixed::stable_partition_copy;
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ALGORITHM_FIXED_STABLE_PARTITION_COPY_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue