mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-01-23 20:46:37 +00:00
join -> append 名前変更
This commit is contained in:
parent
b0ade6c043
commit
f64cac529c
14 changed files with 14 additions and 387 deletions
|
@ -290,4 +290,3 @@ namespace std {
|
|||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_ARRAY_HPP
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
#include <sprout/operation/fit/insert_n.hpp>
|
||||
#include <sprout/operation/fit/erase.hpp>
|
||||
#include <sprout/operation/fit/erase_n.hpp>
|
||||
#include <sprout/operation/fit/join.hpp>
|
||||
#include <sprout/operation/fit/join_back.hpp>
|
||||
#include <sprout/operation/fit/join_front.hpp>
|
||||
#include <sprout/operation/fit/append.hpp>
|
||||
#include <sprout/operation/fit/append_back.hpp>
|
||||
#include <sprout/operation/fit/append_front.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_HPP
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_JOIN_HPP
|
||||
#define SPROUT_OPERATION_FIT_JOIN_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/join.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// join
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct join {
|
||||
public:
|
||||
typedef sprout::sub_array<
|
||||
typename sprout::fixed_container_traits<
|
||||
typename sprout::fixed::result_of::join<Container, Input>::type
|
||||
>::internal_type
|
||||
> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// join
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join<Container, Input>::type join(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::get_fixed(sprout::fixed::join(cont, pos, input)),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + sprout::size(input)
|
||||
);
|
||||
}
|
||||
//
|
||||
// join
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join<Container, Input>::type join(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::get_fixed(sprout::fixed::join(cont, pos, input)),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + sprout::size(input)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_JOIN_HPP
|
|
@ -1,44 +0,0 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_JOIN_BACK_HPP
|
||||
#define SPROUT_OPERATION_FIT_JOIN_BACK_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/join_back.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// join_back
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct join_back {
|
||||
typedef sprout::sub_array<
|
||||
typename sprout::fixed_container_traits<
|
||||
typename sprout::fixed::result_of::join_back<Container, Input>::type
|
||||
>::internal_type
|
||||
> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// join_back
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join_back<Container, Input>::type join_back(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::get_fixed(sprout::fixed::join_back(cont, input)),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + sprout::size(input)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_JOIN_BACK_HPP
|
|
@ -1,44 +0,0 @@
|
|||
#ifndef SPROUT_OPERATION_FIT_JOIN_FRONT_HPP
|
||||
#define SPROUT_OPERATION_FIT_JOIN_FRONT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/join_front.hpp>
|
||||
#include <sprout/sub_array.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fit {
|
||||
namespace result_of {
|
||||
//
|
||||
// join_front
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct join_front {
|
||||
typedef sprout::sub_array<
|
||||
typename sprout::fixed_container_traits<
|
||||
typename sprout::fixed::result_of::join_front<Container, Input>::type
|
||||
>::internal_type
|
||||
> type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// join_front
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join_front<Container, Input>::type join_front(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::sub_copy(
|
||||
sprout::get_fixed(sprout::fixed::join_front(cont, input)),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::fixed_end_offset(cont) + sprout::size(input)
|
||||
);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIT_JOIN_FRONT_HPP
|
|
@ -18,8 +18,8 @@
|
|||
#include <sprout/operation/fixed/insert_n.hpp>
|
||||
#include <sprout/operation/fixed/erase.hpp>
|
||||
#include <sprout/operation/fixed/erase_n.hpp>
|
||||
#include <sprout/operation/fixed/join.hpp>
|
||||
#include <sprout/operation/fixed/join_back.hpp>
|
||||
#include <sprout/operation/fixed/join_front.hpp>
|
||||
#include <sprout/operation/fixed/append.hpp>
|
||||
#include <sprout/operation/fixed/append_back.hpp>
|
||||
#include <sprout/operation/fixed/append_front.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIXED_HPP
|
||||
|
|
|
@ -1,98 +0,0 @@
|
|||
#ifndef SPROUT_OPERATION_FIXED_JOIN_HPP
|
||||
#define SPROUT_OPERATION_FIXED_JOIN_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace result_of {
|
||||
//
|
||||
// join
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct join {
|
||||
public:
|
||||
typedef typename sprout::rebind_fixed_size<
|
||||
Container
|
||||
>::template apply<
|
||||
sprout::fixed_container_traits<Container>::fixed_size + sprout::fixed_container_traits<Input>::fixed_size
|
||||
>::type type;
|
||||
};
|
||||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, typename Input, std::ptrdiff_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result join_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type pos,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type size,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::remake_clone<Result, Container>(
|
||||
cont,
|
||||
sprout::size(cont) + sprout::size(input),
|
||||
(Indexes < sprout::fixed_container_traits<Container>::fixed_size + size
|
||||
? (Indexes < pos
|
||||
? *(sprout::fixed_begin(cont) + Indexes)
|
||||
: Indexes < pos + size
|
||||
? *(sprout::begin(input) + Indexes - pos)
|
||||
: *(sprout::fixed_begin(cont) + Indexes - size)
|
||||
)
|
||||
: typename sprout::fixed_container_traits<Result>::value_type()
|
||||
)...
|
||||
);
|
||||
}
|
||||
} // namespace detail
|
||||
//
|
||||
// join
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join<Container, Input>::type join(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::const_iterator pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::fixed::detail::join_impl<typename sprout::fixed::result_of::join<Container, Input>::type>(
|
||||
cont,
|
||||
typename sprout::index_range<0, sprout::fixed_container_traits<typename sprout::fixed::result_of::join<Container, Input>::type>::fixed_size>::type(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::fixed_begin(cont), pos),
|
||||
sprout::size(input),
|
||||
input
|
||||
);
|
||||
}
|
||||
//
|
||||
// join
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join<Container, Input>::type join(
|
||||
Container const& cont,
|
||||
typename sprout::fixed_container_traits<Container>::difference_type pos,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::fixed::detail::join_impl<typename sprout::fixed::result_of::join<Container, Input>::type>(
|
||||
cont,
|
||||
typename sprout::index_range<0, sprout::fixed_container_traits<typename sprout::fixed::result_of::join<Container, Input>::type>::fixed_size>::type(),
|
||||
NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::fixed_begin(cont), sprout::begin(cont) + pos),
|
||||
sprout::size(input),
|
||||
input
|
||||
);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
namespace result_of {
|
||||
using sprout::fixed::result_of::join;
|
||||
} // namespace result_of
|
||||
|
||||
using sprout::fixed::join;
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIXED_JOIN_HPP
|
|
@ -1,49 +0,0 @@
|
|||
#ifndef SPROUT_OPERATION_FIXED_JOIN_BACK_HPP
|
||||
#define SPROUT_OPERATION_FIXED_JOIN_BACK_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/join.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace result_of {
|
||||
//
|
||||
// join_back
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct join_back
|
||||
: public sprout::fixed::result_of::join<Container, Input>
|
||||
{};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// join_back
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_back<Container, Input>::type join_back(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::fixed::detail::join_impl<typename sprout::fixed::result_of::join_back<Container, Input>::type>(
|
||||
cont,
|
||||
typename sprout::index_range<0, sprout::fixed_container_traits<typename sprout::fixed::result_of::join_back<Container, Input>::type>::fixed_size>::type(),
|
||||
sprout::fixed_end_offset(cont),
|
||||
sprout::size(input),
|
||||
input
|
||||
);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
namespace result_of {
|
||||
using sprout::fixed::result_of::join_back;
|
||||
} // namespace result_of
|
||||
|
||||
using sprout::fixed::join_back;
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIXED_JOIN_BACK_HPP
|
|
@ -1,49 +0,0 @@
|
|||
#ifndef SPROUT_OPERATION_FIXED_JOIN_FRONT_HPP
|
||||
#define SPROUT_OPERATION_FIXED_JOIN_FRONT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/fixed_container/functions.hpp>
|
||||
#include <sprout/operation/fixed/join.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace result_of {
|
||||
//
|
||||
// join_front
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
struct join_front
|
||||
: public sprout::fixed::result_of::join<Container, Input>
|
||||
{};
|
||||
} // namespace result_of
|
||||
|
||||
//
|
||||
// join_front
|
||||
//
|
||||
template<typename Container, typename Input>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_front<Container, Input>::type join_front(
|
||||
Container const& cont,
|
||||
Input const& input
|
||||
)
|
||||
{
|
||||
return sprout::fixed::detail::join_impl<typename sprout::fixed::result_of::join_front<Container, Input>::type>(
|
||||
cont,
|
||||
typename sprout::index_range<0, sprout::fixed_container_traits<typename sprout::fixed::result_of::join_front<Container, Input>::type>::fixed_size>::type(),
|
||||
sprout::fixed_begin_offset(cont),
|
||||
sprout::size(input),
|
||||
input
|
||||
);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
namespace result_of {
|
||||
using sprout::fixed::result_of::join_front;
|
||||
} // namespace result_of
|
||||
|
||||
using sprout::fixed::join_front;
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_FIXED_JOIN_FRONT_HPP
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef SPROUT_OPERATION_JOIN_HPP
|
||||
#define SPROUT_OPERATION_JOIN_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/operation/fixed/join.hpp>
|
||||
#include <sprout/operation/fit/join.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_JOIN_HPP
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef SPROUT_OPERATION_JOIN_BACK_HPP
|
||||
#define SPROUT_OPERATION_JOIN_BACK_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/operation/fixed/join_back.hpp>
|
||||
#include <sprout/operation/fit/join_back.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_JOIN_BACK_HPP
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef SPROUT_OPERATION_JOIN_FRONT_HPP
|
||||
#define SPROUT_OPERATION_JOIN_FRONT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/operation/fixed/join_front.hpp>
|
||||
#include <sprout/operation/fit/join_front.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_OPERATION_JOIN_FRONT_HPP
|
|
@ -13,8 +13,8 @@
|
|||
#include <sprout/fixed_container/traits.hpp>
|
||||
#include <sprout/operation/fixed/push_back.hpp>
|
||||
#include <sprout/operation/fixed/push_front.hpp>
|
||||
#include <sprout/operation/fixed/join_back.hpp>
|
||||
#include <sprout/operation/fixed/join_front.hpp>
|
||||
#include <sprout/operation/fixed/append_back.hpp>
|
||||
#include <sprout/operation/fixed/append_front.hpp>
|
||||
#include <sprout/detail/iterator.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL
|
||||
|
||||
|
@ -685,7 +685,7 @@ namespace sprout {
|
|||
return sprout::fixed::push_front(rhs, lhs);
|
||||
}
|
||||
template<typename T, std::size_t N, typename Traits, std::size_t N2>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_back<
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::append_back<
|
||||
sprout::basic_string<T, N, Traits>,
|
||||
sprout::basic_string<T, N2 - 1, Traits>
|
||||
>::type operator+(
|
||||
|
@ -693,10 +693,10 @@ namespace sprout {
|
|||
T const (& rhs)[N2]
|
||||
)
|
||||
{
|
||||
return sprout::fixed::join_back(lhs, sprout::to_string(rhs));
|
||||
return sprout::fixed::append_back(lhs, sprout::to_string(rhs));
|
||||
}
|
||||
template<typename T, std::size_t N, typename Traits, std::size_t N2>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_front<
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::append_front<
|
||||
sprout::basic_string<T, N, Traits>,
|
||||
sprout::basic_string<T, N2 - 1, Traits>
|
||||
>::type operator+(
|
||||
|
@ -704,10 +704,10 @@ namespace sprout {
|
|||
sprout::basic_string<T, N, Traits> const& rhs
|
||||
)
|
||||
{
|
||||
return sprout::fixed::join_front(rhs, sprout::to_string(lhs));
|
||||
return sprout::fixed::append_front(rhs, sprout::to_string(lhs));
|
||||
}
|
||||
template<typename T, std::size_t N, typename Traits, std::size_t N2>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_back<
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::append_back<
|
||||
sprout::basic_string<T, N, Traits>,
|
||||
sprout::basic_string<T, N2, Traits>
|
||||
>::type operator+(
|
||||
|
@ -715,7 +715,7 @@ namespace sprout {
|
|||
sprout::basic_string<T, N2, Traits> const& rhs
|
||||
)
|
||||
{
|
||||
return sprout::fixed::join_back(lhs, rhs);
|
||||
return sprout::fixed::append_back(lhs, rhs);
|
||||
}
|
||||
|
||||
template<typename T, std::size_t N, typename Traits, typename StreamTraits>
|
||||
|
@ -866,4 +866,3 @@ namespace std {
|
|||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_STRING_HPP
|
||||
|
||||
|
|
|
@ -934,4 +934,3 @@ namespace std {
|
|||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_SUB_ARRAY_HPP
|
||||
|
||||
|
|
Loading…
Reference in a new issue