mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
algorithm/* fix
This commit is contained in:
parent
42d73cc4d5
commit
1e14fb7253
6 changed files with 20 additions and 16 deletions
|
@ -1,6 +1,7 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_MERGE_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_MERGE_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -66,7 +67,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? first1 != last1
|
||||
? first2 != last2
|
||||
? comp(*first2, *first1)
|
||||
|
@ -111,7 +112,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? merge_impl_1(first1, last1, first2, last2, result, comp, offset, args..., *sprout::next(sprout::fixed_begin(result), sizeof...(Args)))
|
||||
: merge_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
|
||||
;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_SET_DIFFERENCE_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_SET_DIFFERENCE_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -66,7 +67,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? first1 != last1
|
||||
? first2 != last2
|
||||
? comp(*first1, *first2)
|
||||
|
@ -113,7 +114,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? set_difference_impl_1(first1, last1, first2, last2, result, comp, offset, args..., *sprout::next(sprout::fixed_begin(result), sizeof...(Args)))
|
||||
: set_difference_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
|
||||
;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_SET_INTERSECTION_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_SET_INTERSECTION_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -66,7 +67,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? first1 != last1
|
||||
? first2 != last2
|
||||
? comp(*first1, *first2)
|
||||
|
@ -113,7 +114,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? set_intersection_impl_1(first1, last1, first2, last2, result, comp, offset, args..., *sprout::next(sprout::fixed_begin(result), sizeof...(Args)))
|
||||
: set_intersection_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
|
||||
;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -66,7 +67,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? first1 != last1
|
||||
? first2 != last2
|
||||
? comp(*first1, *first2)
|
||||
|
@ -113,7 +114,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? set_symmetric_difference_impl_1(first1, last1, first2, last2, result, comp, offset, args..., *sprout::next(sprout::fixed_begin(result), sizeof...(Args)))
|
||||
: set_symmetric_difference_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
|
||||
;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_SET_UNION_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_SET_UNION_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -66,7 +67,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? first1 != last1
|
||||
? first2 != last2
|
||||
? comp(*first1, *first2)
|
||||
|
@ -113,7 +114,7 @@ namespace sprout {
|
|||
Args const&... args
|
||||
)
|
||||
{
|
||||
return sizeof...(Args) < offset
|
||||
return sizeof...(Args) < static_cast<std::size_t>(offset)
|
||||
? set_union_impl_1(first1, last1, first2, last2, result, comp, offset, args..., *sprout::next(sprout::fixed_begin(result), sizeof...(Args)))
|
||||
: set_union_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
|
||||
;
|
||||
|
|
|
@ -200,7 +200,6 @@ namespace sprout {
|
|||
}
|
||||
} // namespace detail
|
||||
//
|
||||
|
||||
// sort
|
||||
//
|
||||
template<typename Container, typename Compare>
|
||||
|
|
Loading…
Reference in a new issue