From f64cac529c92c79aee62be9bd808b1b21d11e4ff Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Mon, 26 Sep 2011 17:25:57 +0900 Subject: [PATCH] =?UTF-8?q?join=20->=20append=20=E5=90=8D=E5=89=8D?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sprout/array.hpp | 1 - sprout/operation/fit.hpp | 6 +- sprout/operation/fit/join.hpp | 62 ----------------- sprout/operation/fit/join_back.hpp | 44 ------------ sprout/operation/fit/join_front.hpp | 44 ------------ sprout/operation/fixed.hpp | 6 +- sprout/operation/fixed/join.hpp | 98 --------------------------- sprout/operation/fixed/join_back.hpp | 49 -------------- sprout/operation/fixed/join_front.hpp | 49 -------------- sprout/operation/join.hpp | 8 --- sprout/operation/join_back.hpp | 8 --- sprout/operation/join_front.hpp | 8 --- sprout/string.hpp | 17 +++-- sprout/sub_array.hpp | 1 - 14 files changed, 14 insertions(+), 387 deletions(-) delete mode 100644 sprout/operation/fit/join.hpp delete mode 100644 sprout/operation/fit/join_back.hpp delete mode 100644 sprout/operation/fit/join_front.hpp delete mode 100644 sprout/operation/fixed/join.hpp delete mode 100644 sprout/operation/fixed/join_back.hpp delete mode 100644 sprout/operation/fixed/join_front.hpp delete mode 100644 sprout/operation/join.hpp delete mode 100644 sprout/operation/join_back.hpp delete mode 100644 sprout/operation/join_front.hpp diff --git a/sprout/array.hpp b/sprout/array.hpp index b523b9ba..fb9d11ef 100644 --- a/sprout/array.hpp +++ b/sprout/array.hpp @@ -290,4 +290,3 @@ namespace std { } // namespace std #endif // #ifndef SPROUT_ARRAY_HPP - diff --git a/sprout/operation/fit.hpp b/sprout/operation/fit.hpp index 19c3a572..80af77b8 100644 --- a/sprout/operation/fit.hpp +++ b/sprout/operation/fit.hpp @@ -18,8 +18,8 @@ #include #include #include -#include -#include -#include +#include +#include +#include #endif // #ifndef SPROUT_OPERATION_FIT_HPP diff --git a/sprout/operation/fit/join.hpp b/sprout/operation/fit/join.hpp deleted file mode 100644 index 2353563b..00000000 --- a/sprout/operation/fit/join.hpp +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef SPROUT_OPERATION_FIT_JOIN_HPP -#define SPROUT_OPERATION_FIT_JOIN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace result_of { - // - // join - // - template - struct join { - public: - typedef sprout::sub_array< - typename sprout::fixed_container_traits< - typename sprout::fixed::result_of::join::type - >::internal_type - > type; - }; - } // namespace result_of - - // - // join - // - template - SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join::type join( - Container const& cont, - typename sprout::fixed_container_traits::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 - SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join::type join( - Container const& cont, - typename sprout::fixed_container_traits::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 diff --git a/sprout/operation/fit/join_back.hpp b/sprout/operation/fit/join_back.hpp deleted file mode 100644 index dc0c61c1..00000000 --- a/sprout/operation/fit/join_back.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef SPROUT_OPERATION_FIT_JOIN_BACK_HPP -#define SPROUT_OPERATION_FIT_JOIN_BACK_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace result_of { - // - // join_back - // - template - struct join_back { - typedef sprout::sub_array< - typename sprout::fixed_container_traits< - typename sprout::fixed::result_of::join_back::type - >::internal_type - > type; - }; - } // namespace result_of - - // - // join_back - // - template - SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join_back::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 diff --git a/sprout/operation/fit/join_front.hpp b/sprout/operation/fit/join_front.hpp deleted file mode 100644 index f65a6293..00000000 --- a/sprout/operation/fit/join_front.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef SPROUT_OPERATION_FIT_JOIN_FRONT_HPP -#define SPROUT_OPERATION_FIT_JOIN_FRONT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace result_of { - // - // join_front - // - template - struct join_front { - typedef sprout::sub_array< - typename sprout::fixed_container_traits< - typename sprout::fixed::result_of::join_front::type - >::internal_type - > type; - }; - } // namespace result_of - - // - // join_front - // - template - SPROUT_CONSTEXPR inline typename sprout::fit::result_of::join_front::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 diff --git a/sprout/operation/fixed.hpp b/sprout/operation/fixed.hpp index 50104f45..89c5888d 100644 --- a/sprout/operation/fixed.hpp +++ b/sprout/operation/fixed.hpp @@ -18,8 +18,8 @@ #include #include #include -#include -#include -#include +#include +#include +#include #endif // #ifndef SPROUT_OPERATION_FIXED_HPP diff --git a/sprout/operation/fixed/join.hpp b/sprout/operation/fixed/join.hpp deleted file mode 100644 index e6836bcc..00000000 --- a/sprout/operation/fixed/join.hpp +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef SPROUT_OPERATION_FIXED_JOIN_HPP -#define SPROUT_OPERATION_FIXED_JOIN_HPP - -#include -#include -#include -#include -#include -#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT_DETAIL - -namespace sprout { - namespace fixed { - namespace result_of { - // - // join - // - template - struct join { - public: - typedef typename sprout::rebind_fixed_size< - Container - >::template apply< - sprout::fixed_container_traits::fixed_size + sprout::fixed_container_traits::fixed_size - >::type type; - }; - } // namespace result_of - - namespace detail { - template - SPROUT_CONSTEXPR inline Result join_impl( - Container const& cont, - sprout::index_tuple, - typename sprout::fixed_container_traits::difference_type pos, - typename sprout::fixed_container_traits::difference_type size, - Input const& input - ) - { - return sprout::remake_clone( - cont, - sprout::size(cont) + sprout::size(input), - (Indexes < sprout::fixed_container_traits::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::value_type() - )... - ); - } - } // namespace detail - // - // join - // - template - SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join::type join( - Container const& cont, - typename sprout::fixed_container_traits::const_iterator pos, - Input const& input - ) - { - return sprout::fixed::detail::join_impl::type>( - cont, - typename sprout::index_range<0, sprout::fixed_container_traits::type>::fixed_size>::type(), - NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::fixed_begin(cont), pos), - sprout::size(input), - input - ); - } - // - // join - // - template - SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join::type join( - Container const& cont, - typename sprout::fixed_container_traits::difference_type pos, - Input const& input - ) - { - return sprout::fixed::detail::join_impl::type>( - cont, - typename sprout::index_range<0, sprout::fixed_container_traits::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 diff --git a/sprout/operation/fixed/join_back.hpp b/sprout/operation/fixed/join_back.hpp deleted file mode 100644 index a047bafb..00000000 --- a/sprout/operation/fixed/join_back.hpp +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef SPROUT_OPERATION_FIXED_JOIN_BACK_HPP -#define SPROUT_OPERATION_FIXED_JOIN_BACK_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace result_of { - // - // join_back - // - template - struct join_back - : public sprout::fixed::result_of::join - {}; - } // namespace result_of - - // - // join_back - // - template - SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_back::type join_back( - Container const& cont, - Input const& input - ) - { - return sprout::fixed::detail::join_impl::type>( - cont, - typename sprout::index_range<0, sprout::fixed_container_traits::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 diff --git a/sprout/operation/fixed/join_front.hpp b/sprout/operation/fixed/join_front.hpp deleted file mode 100644 index b09f8644..00000000 --- a/sprout/operation/fixed/join_front.hpp +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef SPROUT_OPERATION_FIXED_JOIN_FRONT_HPP -#define SPROUT_OPERATION_FIXED_JOIN_FRONT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace result_of { - // - // join_front - // - template - struct join_front - : public sprout::fixed::result_of::join - {}; - } // namespace result_of - - // - // join_front - // - template - SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_front::type join_front( - Container const& cont, - Input const& input - ) - { - return sprout::fixed::detail::join_impl::type>( - cont, - typename sprout::index_range<0, sprout::fixed_container_traits::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 diff --git a/sprout/operation/join.hpp b/sprout/operation/join.hpp deleted file mode 100644 index 9f3eef97..00000000 --- a/sprout/operation/join.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SPROUT_OPERATION_JOIN_HPP -#define SPROUT_OPERATION_JOIN_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_JOIN_HPP diff --git a/sprout/operation/join_back.hpp b/sprout/operation/join_back.hpp deleted file mode 100644 index 40ea6dee..00000000 --- a/sprout/operation/join_back.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SPROUT_OPERATION_JOIN_BACK_HPP -#define SPROUT_OPERATION_JOIN_BACK_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_JOIN_BACK_HPP diff --git a/sprout/operation/join_front.hpp b/sprout/operation/join_front.hpp deleted file mode 100644 index 599f4b7f..00000000 --- a/sprout/operation/join_front.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SPROUT_OPERATION_JOIN_FRONT_HPP -#define SPROUT_OPERATION_JOIN_FRONT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_JOIN_FRONT_HPP diff --git a/sprout/string.hpp b/sprout/string.hpp index 72544d48..d68191b0 100644 --- a/sprout/string.hpp +++ b/sprout/string.hpp @@ -13,8 +13,8 @@ #include #include #include -#include -#include +#include +#include #include #include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT_DETAIL @@ -685,7 +685,7 @@ namespace sprout { return sprout::fixed::push_front(rhs, lhs); } template - SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_back< + SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::append_back< sprout::basic_string, sprout::basic_string >::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 - SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_front< + SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::append_front< sprout::basic_string, sprout::basic_string >::type operator+( @@ -704,10 +704,10 @@ namespace sprout { sprout::basic_string const& rhs ) { - return sprout::fixed::join_front(rhs, sprout::to_string(lhs)); + return sprout::fixed::append_front(rhs, sprout::to_string(lhs)); } template - SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::join_back< + SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::append_back< sprout::basic_string, sprout::basic_string >::type operator+( @@ -715,7 +715,7 @@ namespace sprout { sprout::basic_string const& rhs ) { - return sprout::fixed::join_back(lhs, rhs); + return sprout::fixed::append_back(lhs, rhs); } template @@ -866,4 +866,3 @@ namespace std { } // namespace std #endif // #ifndef SPROUT_STRING_HPP - diff --git a/sprout/sub_array.hpp b/sprout/sub_array.hpp index 71ab54be..dbd12bc4 100644 --- a/sprout/sub_array.hpp +++ b/sprout/sub_array.hpp @@ -934,4 +934,3 @@ namespace std { } // namespace std #endif // #ifndef SPROUT_SUB_ARRAY_HPP -