algorithm/* fix

This commit is contained in:
bolero-MURAKAMI 2011-10-22 21:25:25 +09:00
parent 42d73cc4d5
commit 1e14fb7253
6 changed files with 20 additions and 16 deletions

View file

@ -1,11 +1,12 @@
#ifndef SPROUT_ALGORITHM_FIXED_MERGE_HPP #ifndef SPROUT_ALGORITHM_FIXED_MERGE_HPP
#define SPROUT_ALGORITHM_FIXED_MERGE_HPP #define SPROUT_ALGORITHM_FIXED_MERGE_HPP
#include <cstddef>
#include <type_traits> #include <type_traits>
#include <sprout/config.hpp> #include <sprout/config.hpp>
#include <sprout/fixed_container/traits.hpp> #include <sprout/fixed_container/traits.hpp>
#include <sprout/fixed_container/functions.hpp> #include <sprout/fixed_container/functions.hpp>
#include <sprout/iterator/operation.hpp> #include <sprout/iterator/operation.hpp>
#include <sprout/algorithm/fixed/result_of.hpp> #include <sprout/algorithm/fixed/result_of.hpp>
#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL #include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL
@ -66,7 +67,7 @@ namespace sprout {
Args const&... args Args const&... args
) )
{ {
return sizeof...(Args) < offset return sizeof...(Args) < static_cast<std::size_t>(offset)
? first1 != last1 ? first1 != last1
? first2 != last2 ? first2 != last2
? comp(*first2, *first1) ? comp(*first2, *first1)
@ -111,7 +112,7 @@ namespace sprout {
Args const&... args 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_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...) : merge_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
; ;

View file

@ -1,11 +1,12 @@
#ifndef SPROUT_ALGORITHM_FIXED_SET_DIFFERENCE_HPP #ifndef SPROUT_ALGORITHM_FIXED_SET_DIFFERENCE_HPP
#define SPROUT_ALGORITHM_FIXED_SET_DIFFERENCE_HPP #define SPROUT_ALGORITHM_FIXED_SET_DIFFERENCE_HPP
#include <cstddef>
#include <type_traits> #include <type_traits>
#include <sprout/config.hpp> #include <sprout/config.hpp>
#include <sprout/fixed_container/traits.hpp> #include <sprout/fixed_container/traits.hpp>
#include <sprout/fixed_container/functions.hpp> #include <sprout/fixed_container/functions.hpp>
#include <sprout/iterator/operation.hpp> #include <sprout/iterator/operation.hpp>
#include <sprout/algorithm/fixed/result_of.hpp> #include <sprout/algorithm/fixed/result_of.hpp>
#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL #include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL
@ -66,7 +67,7 @@ namespace sprout {
Args const&... args Args const&... args
) )
{ {
return sizeof...(Args) < offset return sizeof...(Args) < static_cast<std::size_t>(offset)
? first1 != last1 ? first1 != last1
? first2 != last2 ? first2 != last2
? comp(*first1, *first2) ? comp(*first1, *first2)
@ -113,7 +114,7 @@ namespace sprout {
Args const&... args 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_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...) : set_difference_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
; ;

View file

@ -1,11 +1,12 @@
#ifndef SPROUT_ALGORITHM_FIXED_SET_INTERSECTION_HPP #ifndef SPROUT_ALGORITHM_FIXED_SET_INTERSECTION_HPP
#define SPROUT_ALGORITHM_FIXED_SET_INTERSECTION_HPP #define SPROUT_ALGORITHM_FIXED_SET_INTERSECTION_HPP
#include <cstddef>
#include <type_traits> #include <type_traits>
#include <sprout/config.hpp> #include <sprout/config.hpp>
#include <sprout/fixed_container/traits.hpp> #include <sprout/fixed_container/traits.hpp>
#include <sprout/fixed_container/functions.hpp> #include <sprout/fixed_container/functions.hpp>
#include <sprout/iterator/operation.hpp> #include <sprout/iterator/operation.hpp>
#include <sprout/algorithm/fixed/result_of.hpp> #include <sprout/algorithm/fixed/result_of.hpp>
#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL #include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL
@ -66,7 +67,7 @@ namespace sprout {
Args const&... args Args const&... args
) )
{ {
return sizeof...(Args) < offset return sizeof...(Args) < static_cast<std::size_t>(offset)
? first1 != last1 ? first1 != last1
? first2 != last2 ? first2 != last2
? comp(*first1, *first2) ? comp(*first1, *first2)
@ -113,7 +114,7 @@ namespace sprout {
Args const&... args 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_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...) : set_intersection_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
; ;

View file

@ -1,11 +1,12 @@
#ifndef SPROUT_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP #ifndef SPROUT_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP
#define SPROUT_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP #define SPROUT_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP
#include <cstddef>
#include <type_traits> #include <type_traits>
#include <sprout/config.hpp> #include <sprout/config.hpp>
#include <sprout/fixed_container/traits.hpp> #include <sprout/fixed_container/traits.hpp>
#include <sprout/fixed_container/functions.hpp> #include <sprout/fixed_container/functions.hpp>
#include <sprout/iterator/operation.hpp> #include <sprout/iterator/operation.hpp>
#include <sprout/algorithm/fixed/result_of.hpp> #include <sprout/algorithm/fixed/result_of.hpp>
#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL #include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL
@ -66,7 +67,7 @@ namespace sprout {
Args const&... args Args const&... args
) )
{ {
return sizeof...(Args) < offset return sizeof...(Args) < static_cast<std::size_t>(offset)
? first1 != last1 ? first1 != last1
? first2 != last2 ? first2 != last2
? comp(*first1, *first2) ? comp(*first1, *first2)
@ -113,7 +114,7 @@ namespace sprout {
Args const&... args 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_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...) : set_symmetric_difference_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
; ;

View file

@ -1,11 +1,12 @@
#ifndef SPROUT_ALGORITHM_FIXED_SET_UNION_HPP #ifndef SPROUT_ALGORITHM_FIXED_SET_UNION_HPP
#define SPROUT_ALGORITHM_FIXED_SET_UNION_HPP #define SPROUT_ALGORITHM_FIXED_SET_UNION_HPP
#include <cstddef>
#include <type_traits> #include <type_traits>
#include <sprout/config.hpp> #include <sprout/config.hpp>
#include <sprout/fixed_container/traits.hpp> #include <sprout/fixed_container/traits.hpp>
#include <sprout/fixed_container/functions.hpp> #include <sprout/fixed_container/functions.hpp>
#include <sprout/iterator/operation.hpp> #include <sprout/iterator/operation.hpp>
#include <sprout/algorithm/fixed/result_of.hpp> #include <sprout/algorithm/fixed/result_of.hpp>
#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL #include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT_DETAIL
@ -66,7 +67,7 @@ namespace sprout {
Args const&... args Args const&... args
) )
{ {
return sizeof...(Args) < offset return sizeof...(Args) < static_cast<std::size_t>(offset)
? first1 != last1 ? first1 != last1
? first2 != last2 ? first2 != last2
? comp(*first1, *first2) ? comp(*first1, *first2)
@ -113,7 +114,7 @@ namespace sprout {
Args const&... args 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_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...) : set_union_impl_2(first1, last1, first2, last2, result, comp, offset + sprout::size(result), args...)
; ;

View file

@ -200,7 +200,6 @@ namespace sprout {
} }
} // namespace detail } // namespace detail
// //
// sort // sort
// //
template<typename Container, typename Compare> template<typename Container, typename Compare>