Ejemplo n.º 1
0
	inline SPROUT_CONSTEXPR sprout::basic_string<T, N1 + N2, Traits>
	operator+(sprout::basic_string<T, N1, Traits> const& lhs, sprout::basic_string<T, N2, Traits> const& rhs) {
		return sprout::detail::string_concat(
			lhs, lhs.size(),
			rhs, rhs.size(),
			sprout::make_index_tuple<N1 + N2>::make()
			);
	}
Ejemplo n.º 2
0
	inline SPROUT_CONSTEXPR sprout::basic_string<T, (M - 1) + N, Traits>
	operator+(T const (& lhs)[M], sprout::basic_string<T, N, Traits> const& rhs) {
		return sprout::detail::string_concat(
			lhs, sprout::char_traits<T>::length(lhs),
			rhs, rhs.size(),
			sprout::index_range<0, (M - 1) + N>::make()
			);
	}
Ejemplo n.º 3
0
	inline SPROUT_CONSTEXPR sprout::basic_string<T, 1 + N, Traits>
	operator+(T const& lhs, sprout::basic_string<T, N, Traits> const& rhs) {
		return sprout::detail::string_concat(
			lhs,
			rhs, rhs.size(),
			sprout::index_range<0, 1 + N>::make()
			);
	}
Ejemplo n.º 4
0
	inline SPROUT_INITIALIZER_LIST_CONSTEXPR sprout::basic_string<T, N, Traits>
	operator>>(sprout::basic_string<T, N, Traits> const& lhs, std::initializer_list<T> rhs) {
		return sprout::detail::string_lshift(
			lhs, lhs.size(),
			rhs, rhs.size(),
			sprout::make_index_tuple<N>::make()
			);
	}
Ejemplo n.º 5
0
	inline SPROUT_CONSTEXPR sprout::basic_string<T, N, Traits>
	operator>>(sprout::basic_string<T, N, Traits> const& lhs, T const* rhs) {
		return sprout::detail::string_lshift(
			lhs, lhs.size(),
			rhs, Traits::length(rhs),
			sprout::make_index_tuple<N>::make()
			);
	}
Ejemplo n.º 6
0
	inline SPROUT_CONSTEXPR sprout::basic_string<T, (M - 1) + N, Traits>
	operator+(T const (& lhs)[M], sprout::basic_string<T, N, Traits> const& rhs) {
		typedef sprout::char_traits_helper<Traits> traits_type;
		return sprout::detail::string_concat(
			lhs, traits_type::length(lhs, M - 1),
			rhs, rhs.size(),
			sprout::make_index_tuple<(M - 1) + N>::make()
			);
	}