mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-02 14:04:20 +00:00
modify namespace result_of -> results
support C++14 type_traits
This commit is contained in:
parent
d386893a74
commit
bf0c7021cf
350 changed files with 2628 additions and 1912 deletions
|
@ -12,7 +12,7 @@
|
|||
#include <sprout/container/traits.hpp>
|
||||
#include <sprout/container/functions.hpp>
|
||||
#include <sprout/algorithm/string/fixed/to_lower.hpp>
|
||||
#include <sprout/algorithm/fit/result_of.hpp>
|
||||
#include <sprout/algorithm/fit/results.hpp>
|
||||
#include <sprout/sub_array/sub_array.hpp>
|
||||
#include <sprout/sub_array/sub.hpp>
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Container>::type
|
||||
to_lower_impl(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type offset
|
||||
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
// to_lower
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Container>::type
|
||||
to_lower(Container const& cont) {
|
||||
return sprout::algorithm::fit::detail::to_lower_impl(cont, sprout::internal_begin_offset(cont));
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <sprout/container/traits.hpp>
|
||||
#include <sprout/container/functions.hpp>
|
||||
#include <sprout/algorithm/string/fixed/to_lower_copy.hpp>
|
||||
#include <sprout/algorithm/fit/result_of.hpp>
|
||||
#include <sprout/algorithm/fit/results.hpp>
|
||||
#include <sprout/sub_array/sub_array.hpp>
|
||||
#include <sprout/sub_array/sub.hpp>
|
||||
#include <sprout/iterator/type_traits/category.hpp>
|
||||
|
@ -23,7 +23,7 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
to_lower_copy_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
|
@ -40,7 +40,7 @@ namespace sprout {
|
|||
// to_lower_copy
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
to_lower_copy(InputIterator first, InputIterator last, Result const& result) {
|
||||
static_assert(sprout::is_forward_iterator<InputIterator>::value, "Sorry, not implemented.");
|
||||
return sprout::algorithm::fit::detail::to_lower_copy_impl(first, last, result, sprout::internal_begin_offset(result));
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <sprout/container/traits.hpp>
|
||||
#include <sprout/container/functions.hpp>
|
||||
#include <sprout/algorithm/string/fixed/to_upper.hpp>
|
||||
#include <sprout/algorithm/fit/result_of.hpp>
|
||||
#include <sprout/algorithm/fit/results.hpp>
|
||||
#include <sprout/sub_array/sub_array.hpp>
|
||||
#include <sprout/sub_array/sub.hpp>
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Container>::type
|
||||
to_upper_impl(
|
||||
Container const& cont,
|
||||
typename sprout::container_traits<Container>::difference_type offset
|
||||
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
// to_upper
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Container>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Container>::type
|
||||
to_upper(Container const& cont) {
|
||||
return sprout::algorithm::fit::detail::to_upper_impl(cont, sprout::internal_begin_offset(cont));
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <sprout/container/traits.hpp>
|
||||
#include <sprout/container/functions.hpp>
|
||||
#include <sprout/algorithm/string/fixed/to_upper_copy.hpp>
|
||||
#include <sprout/algorithm/fit/result_of.hpp>
|
||||
#include <sprout/algorithm/fit/results.hpp>
|
||||
#include <sprout/sub_array/sub_array.hpp>
|
||||
#include <sprout/sub_array/sub.hpp>
|
||||
#include <sprout/iterator/type_traits/category.hpp>
|
||||
|
@ -23,7 +23,7 @@ namespace sprout {
|
|||
namespace fit {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
to_upper_copy_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
|
@ -40,7 +40,7 @@ namespace sprout {
|
|||
// to_upper_copy
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
to_upper_copy(InputIterator first, InputIterator last, Result const& result) {
|
||||
static_assert(sprout::is_forward_iterator<InputIterator>::value, "Sorry, not implemented.");
|
||||
return sprout::algorithm::fit::detail::to_upper_copy_impl(first, last, result, sprout::internal_begin_offset(result));
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/result_of.hpp>
|
||||
#include <sprout/algorithm/fixed/results.hpp>
|
||||
#include <sprout/algorithm/string/fixed/to_lower_copy.hpp>
|
||||
|
||||
namespace sprout {
|
||||
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
// to_lower
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Container>::type
|
||||
to_lower(Container const& cont) {
|
||||
return sprout::algorithm::fixed::to_lower_copy(sprout::begin(cont), sprout::end(cont), cont);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#define SPROUT_ALGORITHM_STRING_FIXED_TO_LOWER_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/algorithm/fixed/result_of.hpp>
|
||||
#include <sprout/algorithm/fixed/results.hpp>
|
||||
#include <sprout/algorithm/fixed/transform.hpp>
|
||||
#include <sprout/pit/pit.hpp>
|
||||
#include <sprout/ctype/functor.hpp>
|
||||
|
@ -21,13 +21,13 @@ namespace sprout {
|
|||
// to_lower_copy
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
to_lower_copy(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::transform(first, last, sprout::ctypes::to_lower<>(), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
to_lower_copy(InputIterator first, InputIterator last) {
|
||||
return sprout::algorithm::fixed::to_lower_copy(first, last, sprout::pit<Result>());
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/container/functions.hpp>
|
||||
#include <sprout/algorithm/fixed/result_of.hpp>
|
||||
#include <sprout/algorithm/fixed/results.hpp>
|
||||
#include <sprout/algorithm/string/fixed/to_upper_copy.hpp>
|
||||
|
||||
namespace sprout {
|
||||
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
// to_upper
|
||||
//
|
||||
template<typename Container>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Container>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Container>::type
|
||||
to_upper(Container const& cont) {
|
||||
return sprout::algorithm::fixed::to_upper_copy(sprout::begin(cont), sprout::end(cont), cont);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#define SPROUT_ALGORITHM_STRING_FIXED_TO_UPPER_COPY_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/algorithm/fixed/result_of.hpp>
|
||||
#include <sprout/algorithm/fixed/results.hpp>
|
||||
#include <sprout/algorithm/fixed/transform.hpp>
|
||||
#include <sprout/pit/pit.hpp>
|
||||
#include <sprout/ctype/functor.hpp>
|
||||
|
@ -21,13 +21,13 @@ namespace sprout {
|
|||
// to_upper_copy
|
||||
//
|
||||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
to_upper_copy(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::transform(first, last, sprout::ctypes::to_upper<>(), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
to_upper_copy(InputIterator first, InputIterator last) {
|
||||
return sprout::algorithm::fixed::to_upper_copy(first, last, sprout::pit<Result>());
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace sprout {
|
|||
}
|
||||
} // namespace detail
|
||||
|
||||
namespace result_of {
|
||||
namespace results {
|
||||
//
|
||||
// join
|
||||
//
|
||||
|
@ -98,7 +98,7 @@ namespace sprout {
|
|||
* sprout::container_traits<ContainerContainer>::static_size
|
||||
>
|
||||
{};
|
||||
} // namespace result_of
|
||||
} // namespace results
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename ContIterator, typename SizeIterator, typename Sizes>
|
||||
|
@ -238,10 +238,10 @@ namespace sprout {
|
|||
>::iterator
|
||||
>::value
|
||||
,
|
||||
typename sprout::algorithm::result_of::join<ContainerContainer>::type
|
||||
typename sprout::algorithm::results::join<ContainerContainer>::type
|
||||
>::type
|
||||
join(ContainerContainer const& cont_cont) {
|
||||
typedef typename sprout::algorithm::result_of::join<ContainerContainer>::type result_type;
|
||||
typedef typename sprout::algorithm::results::join<ContainerContainer>::type result_type;
|
||||
return sprout::algorithm::detail::join_impl_ra<result_type>(cont_cont);
|
||||
}
|
||||
template<typename ContainerContainer>
|
||||
|
@ -255,10 +255,10 @@ namespace sprout {
|
|||
>::iterator
|
||||
>::value
|
||||
),
|
||||
typename sprout::algorithm::result_of::join<ContainerContainer>::type
|
||||
typename sprout::algorithm::results::join<ContainerContainer>::type
|
||||
>::type
|
||||
join(ContainerContainer const& cont_cont) {
|
||||
typedef typename sprout::algorithm::result_of::join<ContainerContainer>::type result_type;
|
||||
typedef typename sprout::algorithm::results::join<ContainerContainer>::type result_type;
|
||||
return sprout::algorithm::detail::join_impl<result_type>(
|
||||
sprout::begin(cont_cont),
|
||||
sprout::end(cont_cont)
|
||||
|
@ -269,7 +269,7 @@ namespace sprout {
|
|||
// join
|
||||
//
|
||||
template<typename ContainerContainer>
|
||||
inline SPROUT_CONSTEXPR typename sprout::algorithm::result_of::join<ContainerContainer>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::algorithm::results::join<ContainerContainer>::type
|
||||
join(ContainerContainer const& cont_cont) {
|
||||
return sprout::algorithm::detail::join(cont_cont);
|
||||
}
|
||||
|
@ -453,10 +453,10 @@ namespace sprout {
|
|||
typename sprout::container_traits<Separator const>::iterator
|
||||
>::value
|
||||
,
|
||||
typename sprout::algorithm::result_of::join<ContainerContainer, Separator>::type
|
||||
typename sprout::algorithm::results::join<ContainerContainer, Separator>::type
|
||||
>::type
|
||||
join(ContainerContainer const& cont_cont, Separator const& separator) {
|
||||
typedef typename sprout::algorithm::result_of::join<ContainerContainer, Separator>::type result_type;
|
||||
typedef typename sprout::algorithm::results::join<ContainerContainer, Separator>::type result_type;
|
||||
return sprout::algorithm::detail::join_impl_ra<result_type>(cont_cont, separator);
|
||||
}
|
||||
template<typename ContainerContainer, typename Separator>
|
||||
|
@ -473,10 +473,10 @@ namespace sprout {
|
|||
typename sprout::container_traits<Separator const>::iterator
|
||||
>::value
|
||||
),
|
||||
typename sprout::algorithm::result_of::join<ContainerContainer, Separator>::type
|
||||
typename sprout::algorithm::results::join<ContainerContainer, Separator>::type
|
||||
>::type
|
||||
join(ContainerContainer const& cont_cont, Separator const& separator) {
|
||||
typedef typename sprout::algorithm::result_of::join<ContainerContainer, Separator>::type result_type;
|
||||
typedef typename sprout::algorithm::results::join<ContainerContainer, Separator>::type result_type;
|
||||
return sprout::algorithm::detail::join_impl<result_type>(
|
||||
sprout::begin(cont_cont),
|
||||
sprout::end(cont_cont),
|
||||
|
@ -490,7 +490,7 @@ namespace sprout {
|
|||
// join
|
||||
//
|
||||
template<typename ContainerContainer, typename Separator>
|
||||
inline SPROUT_CONSTEXPR typename sprout::algorithm::result_of::join<ContainerContainer, Separator>::type
|
||||
inline SPROUT_CONSTEXPR typename sprout::algorithm::results::join<ContainerContainer, Separator>::type
|
||||
join(ContainerContainer const& cont_cont, Separator const& separator) {
|
||||
return sprout::algorithm::detail::join(cont_cont, separator);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue