[desuructive changes] container traits new interface [破壊的変更]

This commit is contained in:
bolero-MURAKAMI 2012-03-31 16:24:13 +09:00
parent 52a2178ac1
commit ad60c8c530
356 changed files with 3183 additions and 3251 deletions

View file

@ -2,8 +2,8 @@
#define SPROUT_ALGORITHM_FIT_NTH_ELEMENT_HPP
#include <sprout/config.hpp>
#include <sprout/fixed_container/traits.hpp>
#include <sprout/fixed_container/functions.hpp>
#include <sprout/container/traits.hpp>
#include <sprout/container/functions.hpp>
#include <sprout/algorithm/fixed/nth_element.hpp>
#include <sprout/algorithm/fit/result_of.hpp>
#include <sprout/sub_array.hpp>
@ -15,13 +15,13 @@ namespace sprout {
template<typename Container, typename Compare>
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::algorithm<Container>::type nth_element_impl(
Container const& cont,
typename sprout::fixed_container_traits<Container>::const_iterator nth,
typename sprout::container_traits<Container>::const_iterator nth,
Compare comp,
typename sprout::fixed_container_traits<Container>::difference_type offset
typename sprout::container_traits<Container>::difference_type offset
)
{
return sprout::sub_copy(
sprout::get_fixed(sprout::fixed::nth_element(cont, nth, comp)),
sprout::get_internal(sprout::fixed::nth_element(cont, nth, comp)),
offset,
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::begin(cont), nth) + 1
);
@ -33,23 +33,23 @@ namespace sprout {
template<typename Container, typename Compare>
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::algorithm<Container>::type nth_element(
Container const& cont,
typename sprout::fixed_container_traits<Container>::const_iterator nth,
typename sprout::container_traits<Container>::const_iterator nth,
Compare comp
)
{
return sprout::fit::detail::nth_element_impl(cont, nth, comp, sprout::fixed_begin_offset(cont));
return sprout::fit::detail::nth_element_impl(cont, nth, comp, sprout::internal_begin_offset(cont));
}
namespace detail {
template<typename Container>
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::algorithm<Container>::type nth_element_impl(
Container const& cont,
typename sprout::fixed_container_traits<Container>::const_iterator nth,
typename sprout::fixed_container_traits<Container>::difference_type offset
typename sprout::container_traits<Container>::const_iterator nth,
typename sprout::container_traits<Container>::difference_type offset
)
{
return sprout::sub_copy(
sprout::get_fixed(sprout::fixed::nth_element(cont, nth)),
sprout::get_internal(sprout::fixed::nth_element(cont, nth)),
offset,
offset + NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::begin(cont), nth) + 1
);
@ -61,10 +61,10 @@ namespace sprout {
template<typename Container>
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::algorithm<Container>::type nth_element(
Container const& cont,
typename sprout::fixed_container_traits<Container>::const_iterator nth
typename sprout::container_traits<Container>::const_iterator nth
)
{
return sprout::fit::detail::nth_element_impl(cont, nth, sprout::fixed_begin_offset(cont));
return sprout::fit::detail::nth_element_impl(cont, nth, sprout::internal_begin_offset(cont));
}
} // namespace fit
} // namespace sprout