fix inherit_if_xxx decltype

This commit is contained in:
bolero-MURAKAMI 2012-05-14 11:33:36 +09:00
parent e4a0f7549b
commit 3a999dd70c
54 changed files with 154 additions and 152 deletions

View file

@ -47,7 +47,7 @@ namespace sprout {
first, first,
last, last,
result, result,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -48,7 +48,7 @@ namespace sprout {
first, first,
last, last,
result, result,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_end_offset(result), sprout::internal_end_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -42,7 +42,7 @@ namespace sprout {
return sprout::fixed::detail::fill_impl( return sprout::fixed::detail::fill_impl(
cont, cont,
value, value,
typename sprout::index_range<0, sprout::container_traits<Container>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Container>::static_size>::make(),
sprout::internal_begin_offset(cont), sprout::internal_begin_offset(cont),
sprout::size(cont) sprout::size(cont)
); );

View file

@ -23,7 +23,7 @@ namespace sprout {
return sprout::fixed::detail::fill_impl( return sprout::fixed::detail::fill_impl(
cont, cont,
value, value,
typename sprout::index_range<0, sprout::container_traits<Container>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Container>::static_size>::make(),
sprout::internal_begin_offset(cont), sprout::internal_begin_offset(cont),
n n
); );

View file

@ -54,7 +54,7 @@ namespace sprout {
result, result,
old_value, old_value,
new_value, new_value,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -53,7 +53,7 @@ namespace sprout {
result, result,
pred, pred,
new_value, new_value,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -47,7 +47,7 @@ namespace sprout {
first, first,
last, last,
result, result,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -53,7 +53,7 @@ namespace sprout {
middle, middle,
last, last,
result, result,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -103,7 +103,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::shuffle_impl( return sprout::fixed::detail::shuffle_impl(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<Container>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Container>::static_size>::make(),
sprout::forward<UniformRandomNumberGenerator>(g), sprout::forward<UniformRandomNumberGenerator>(g),
sprout::internal_begin_offset(cont), sprout::internal_begin_offset(cont),
sprout::size(cont) sprout::size(cont)

View file

@ -140,7 +140,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::shuffle_result_impl( return sprout::fixed::detail::shuffle_result_impl(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<Container>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Container>::static_size>::make(),
sprout::forward<UniformRandomNumberGenerator>(g), sprout::forward<UniformRandomNumberGenerator>(g),
sprout::internal_begin_offset(cont), sprout::internal_begin_offset(cont),
sprout::size(cont) sprout::size(cont)

View file

@ -57,7 +57,7 @@ namespace sprout {
result, result,
pos1, pos1,
pos2, pos2,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -50,7 +50,7 @@ namespace sprout {
last, last,
result, result,
op, op,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)
@ -155,7 +155,7 @@ namespace sprout {
first2, first2,
result, result,
op, op,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1) NS_SSCRISK_CEL_OR_SPROUT::distance(first1, last1)

View file

@ -258,7 +258,7 @@ namespace sprout {
// //
template<typename T, std::size_t N> template<typename T, std::size_t N>
inline SPROUT_CONSTEXPR sprout::array<T, N> to_array(T const (& arr)[N]) { inline SPROUT_CONSTEXPR sprout::array<T, N> to_array(T const (& arr)[N]) {
return sprout::detail::to_array_impl(arr, typename sprout::index_range<0, N>::type()); return sprout::detail::to_array_impl(arr, sprout::index_range<0, N>::make());
} }
// //

View file

@ -55,7 +55,7 @@ namespace sprout {
} }
public: public:
static SPROUT_CONSTEXPR type call(src_type const& e) { static SPROUT_CONSTEXPR type call(src_type const& e) {
return call_impl(typename sprout::index_range<0, sizeof...(Args)>::type()); return call_impl(sprout::index_range<0, sizeof...(Args)>::make());
} }
}; };
template<typename Tag, typename... Args> template<typename Tag, typename... Args>
@ -74,7 +74,7 @@ namespace sprout {
} }
public: public:
static SPROUT_CONSTEXPR type call(src_type const& e) { static SPROUT_CONSTEXPR type call(src_type const& e) {
return call_impl(typename sprout::index_range<0, sizeof...(Args)>::type()); return call_impl(sprout::index_range<0, sizeof...(Args)>::make());
} }
}; };
} // namespace detail } // namespace detail

View file

@ -74,7 +74,7 @@ namespace sprout {
typename pass_through_impl::data_param d typename pass_through_impl::data_param d
) const ) const
{ {
return call_impl(e, s, d, typename sprout::index_range<0, Arity>::type()); return call_impl(e, s, d, sprout::index_range<0, Arity>::make());
} }
}; };
template<typename Grammar, typename Expr, typename State, typename Data> template<typename Grammar, typename Expr, typename State, typename Data>

View file

@ -106,12 +106,12 @@ namespace sprout {
width, width,
height, height,
depth_max, depth_max,
typename sprout::index_range< sprout::index_range<
0, 0,
sprout::container_traits< sprout::container_traits<
typename sprout::container_traits<Pixels>::value_type typename sprout::container_traits<Pixels>::value_type
>::static_size >::static_size
>::type() >::make()
)... )...
); );
} }
@ -162,10 +162,10 @@ namespace sprout {
width, width,
height, height,
depth_max, depth_max,
typename sprout::index_range< sprout::index_range<
0, 0,
sprout::container_traits<Pixels>::static_size sprout::container_traits<Pixels>::static_size
>::type() >::make()
); );
} }

View file

@ -180,7 +180,7 @@ namespace sprout {
SPROUT_CONSTEXPR auto operator()(CVArg& arg, sprout::tuples::tuple<Args...>& tuple) const volatile SPROUT_CONSTEXPR auto operator()(CVArg& arg, sprout::tuples::tuple<Args...>& tuple) const volatile
-> decltype(arg(std::declval<Args>()...)) -> decltype(arg(std::declval<Args>()...))
{ {
return call(arg, tuple, typename sprout::index_range<0, sizeof...(Args)>::type()); return call(arg, tuple, sprout::index_range<0, sizeof...(Args)>::make());
} }
}; };
template<typename Arg> template<typename Arg>

View file

@ -44,7 +44,7 @@ namespace sprout {
first, first,
last, last,
result, result,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -44,7 +44,7 @@ namespace sprout {
first, first,
last, last,
result, result,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -53,7 +53,7 @@ namespace sprout {
first, first,
last, last,
result, result,
typename sprout::index_range<0, sprout::container_traits<Result>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Result>::static_size>::make(),
sprout::internal_begin_offset(result), sprout::internal_begin_offset(result),
sprout::size(result), sprout::size(result),
NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)

View file

@ -47,7 +47,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::bitrev_table_impl( return sprout::fixed::detail::bitrev_table_impl(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<Container>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Container>::static_size>::make(),
sprout::empty(cont) sprout::empty(cont)
? 0 ? 0
: sprout::bit_length(sprout::size(cont) - 1) : sprout::bit_length(sprout::size(cont) - 1)

View file

@ -41,7 +41,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::iota_impl( return sprout::fixed::detail::iota_impl(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<Container>::static_size>::type(), sprout::index_range<0, sprout::container_traits<Container>::static_size>::make(),
value, value,
sprout::internal_begin_offset(cont), sprout::internal_begin_offset(cont),
sprout::size(cont) sprout::size(cont)

View file

@ -62,7 +62,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append<Container, Input>::type>( return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append<Container, Input>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append<Container, Input>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append<Container, Input>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos), NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos),
sprout::size(input), sprout::size(input),
input input
@ -80,7 +80,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append<Container, Input>::type>( return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append<Container, Input>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append<Container, Input>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append<Container, Input>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)),
sprout::size(input), sprout::size(input),
input input

View file

@ -31,7 +31,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append_back<Container, Input>::type>( return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append_back<Container, Input>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append_back<Container, Input>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append_back<Container, Input>::type>::static_size>::make(),
sprout::internal_end_offset(cont), sprout::internal_end_offset(cont),
sprout::size(input), sprout::size(input),
input input

View file

@ -31,7 +31,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append_front<Container, Input>::type>( return sprout::fixed::detail::append_impl<typename sprout::fixed::result_of::append_front<Container, Input>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append_front<Container, Input>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::append_front<Container, Input>::type>::static_size>::make(),
sprout::internal_begin_offset(cont), sprout::internal_begin_offset(cont),
sprout::size(input), sprout::size(input),
input input

View file

@ -58,7 +58,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::erase<Container>::type>( return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::erase<Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase<Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase<Container>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos) NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos)
); );
} }
@ -73,7 +73,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::erase<Container>::type>( return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::erase<Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase<Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase<Container>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)) NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos))
); );
} }

View file

@ -59,7 +59,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::erase_n<N, Container>::type>( return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::erase_n<N, Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase_n<N, Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase_n<N, Container>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos) NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos)
); );
} }
@ -74,7 +74,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::erase_n<N, Container>::type>( return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::erase_n<N, Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase_n<N, Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::erase_n<N, Container>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)) NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos))
); );
} }

View file

@ -65,7 +65,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::insert_impl<typename sprout::fixed::result_of::insert<Container, T, Values...>::type>( return sprout::fixed::detail::insert_impl<typename sprout::fixed::result_of::insert<Container, T, Values...>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::insert<Container, T, Values...>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::insert<Container, T, Values...>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos), NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos),
v, v,
values... values...
@ -84,7 +84,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::insert_impl<typename sprout::fixed::result_of::insert<Container, T, Values...>::type>( return sprout::fixed::detail::insert_impl<typename sprout::fixed::result_of::insert<Container, T, Values...>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::insert<Container, T, Values...>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::insert<Container, T, Values...>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)),
v, v,
values... values...

View file

@ -67,7 +67,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::insert_n_impl<N, typename sprout::fixed::result_of::insert_n<N, Container, T, Values...>::type>( return sprout::fixed::detail::insert_n_impl<N, typename sprout::fixed::result_of::insert_n<N, Container, T, Values...>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::insert_n<N, Container, T, Values...>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::insert_n<N, Container, T, Values...>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos), NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos),
v, v,
values... values...
@ -86,7 +86,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::insert_n_impl<N, typename sprout::fixed::result_of::insert_n<N, Container, T, Values...>::type>( return sprout::fixed::detail::insert_n_impl<N, typename sprout::fixed::result_of::insert_n<N, Container, T, Values...>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::insert_n<N, Container, T, Values...>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::insert_n<N, Container, T, Values...>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)),
v, v,
values... values...

View file

@ -30,7 +30,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::pop_back<Container>::type>( return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::pop_back<Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::pop_back<Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::pop_back<Container>::type>::static_size>::make(),
sprout::internal_end_offset(cont) - 1 sprout::internal_end_offset(cont) - 1
); );
} }

View file

@ -30,7 +30,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::pop_back_n<N, Container>::type>( return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::pop_back_n<N, Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::pop_back_n<N, Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::pop_back_n<N, Container>::type>::static_size>::make(),
sprout::internal_end_offset(cont) - N sprout::internal_end_offset(cont) - N
); );
} }

View file

@ -30,7 +30,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::pop_front<Container>::type>( return sprout::fixed::detail::erase_impl<typename sprout::fixed::result_of::pop_front<Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::pop_front<Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::pop_front<Container>::type>::static_size>::make(),
sprout::internal_begin_offset(cont) sprout::internal_begin_offset(cont)
); );
} }

View file

@ -30,7 +30,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::pop_front_n<N, Container>::type>( return sprout::fixed::detail::erase_n_impl<N, typename sprout::fixed::result_of::pop_front_n<N, Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::pop_front_n<N, Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::pop_front_n<N, Container>::type>::static_size>::make(),
sprout::internal_begin_offset(cont) sprout::internal_begin_offset(cont)
); );
} }

View file

@ -32,7 +32,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::insert_impl<typename sprout::fixed::result_of::push_back<Container, T, Values...>::type>( return sprout::fixed::detail::insert_impl<typename sprout::fixed::result_of::push_back<Container, T, Values...>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::push_back<Container, T, Values...>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::push_back<Container, T, Values...>::type>::static_size>::make(),
sprout::internal_end_offset(cont), sprout::internal_end_offset(cont),
v, v,
values... values...

View file

@ -32,7 +32,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::insert_n_impl<N, typename sprout::fixed::result_of::push_back_n<N, Container, T, Values...>::type>( return sprout::fixed::detail::insert_n_impl<N, typename sprout::fixed::result_of::push_back_n<N, Container, T, Values...>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::push_back_n<N, Container, T, Values...>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::push_back_n<N, Container, T, Values...>::type>::static_size>::make(),
sprout::internal_end_offset(cont), sprout::internal_end_offset(cont),
v, v,
values... values...

View file

@ -32,7 +32,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::insert_impl<typename sprout::fixed::result_of::push_front<Container, T, Values...>::type>( return sprout::fixed::detail::insert_impl<typename sprout::fixed::result_of::push_front<Container, T, Values...>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::push_front<Container, T, Values...>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::push_front<Container, T, Values...>::type>::static_size>::make(),
sprout::internal_begin_offset(cont), sprout::internal_begin_offset(cont),
v, v,
values... values...

View file

@ -32,7 +32,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::insert_n_impl<N, typename sprout::fixed::result_of::push_front_n<N, Container, T, Values...>::type>( return sprout::fixed::detail::insert_n_impl<N, typename sprout::fixed::result_of::push_front_n<N, Container, T, Values...>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::push_front_n<N, Container, T, Values...>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::push_front_n<N, Container, T, Values...>::type>::static_size>::make(),
sprout::internal_begin_offset(cont), sprout::internal_begin_offset(cont),
v, v,
values... values...

View file

@ -48,7 +48,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::realign_impl<typename sprout::fixed::result_of::realign<Container>::type>( return sprout::fixed::detail::realign_impl<typename sprout::fixed::result_of::realign<Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::realign<Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::realign<Container>::type>::static_size>::make(),
sprout::size(cont), sprout::size(cont),
v v
); );
@ -80,7 +80,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::realign_impl<typename sprout::fixed::result_of::realign<Container>::type>( return sprout::fixed::detail::realign_impl<typename sprout::fixed::result_of::realign<Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::realign<Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::realign<Container>::type>::static_size>::make(),
sprout::size(cont) sprout::size(cont)
); );
} }

View file

@ -32,7 +32,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::realign_impl<typename sprout::fixed::result_of::realign_to<Result, Container>::type>( return sprout::fixed::detail::realign_impl<typename sprout::fixed::result_of::realign_to<Result, Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::realign_to<Result, Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::realign_to<Result, Container>::type>::static_size>::make(),
sprout::size(cont), sprout::size(cont),
v v
); );
@ -48,7 +48,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::realign_impl<typename sprout::fixed::result_of::realign_to<Result, Container>::type>( return sprout::fixed::detail::realign_impl<typename sprout::fixed::result_of::realign_to<Result, Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::realign_to<Result, Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::realign_to<Result, Container>::type>::static_size>::make(),
sprout::size(cont) sprout::size(cont)
); );
} }

View file

@ -53,7 +53,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::resize_impl<typename sprout::fixed::result_of::resize<N, Container>::type>( return sprout::fixed::detail::resize_impl<typename sprout::fixed::result_of::resize<N, Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::resize<N, Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::resize<N, Container>::type>::static_size>::make(),
sprout::size(cont), sprout::size(cont),
v v
); );
@ -84,7 +84,7 @@ namespace sprout {
) )
{ {
return sprout::fixed::detail::resize_impl<typename sprout::fixed::result_of::resize<N, Container>::type>( return sprout::fixed::detail::resize_impl<typename sprout::fixed::result_of::resize<N, Container>::type>(
cont, typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::resize<N, Container>::type>::static_size>::type(), cont, sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::resize<N, Container>::type>::static_size>::make(),
sprout::size(cont) sprout::size(cont)
); );
} }

View file

@ -50,7 +50,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::resize_backward_impl<typename sprout::fixed::result_of::resize_backward<N, Container>::type>( return sprout::fixed::detail::resize_backward_impl<typename sprout::fixed::result_of::resize_backward<N, Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::resize_backward<N, Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::resize_backward<N, Container>::type>::static_size>::make(),
sprout::size(cont), sprout::size(cont),
static_cast<typename sprout::container_traits<Container>::difference_type>( static_cast<typename sprout::container_traits<Container>::difference_type>(
sprout::container_traits<typename sprout::fixed::result_of::resize_backward<N, Container>::type>::static_size sprout::container_traits<typename sprout::fixed::result_of::resize_backward<N, Container>::type>::static_size
@ -87,7 +87,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::resize_backward_impl<typename sprout::fixed::result_of::resize_backward<N, Container>::type>( return sprout::fixed::detail::resize_backward_impl<typename sprout::fixed::result_of::resize_backward<N, Container>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::resize_backward<N, Container>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::resize_backward<N, Container>::type>::static_size>::make(),
sprout::size(cont), sprout::size(cont),
static_cast<typename sprout::container_traits<Container>::difference_type>( static_cast<typename sprout::container_traits<Container>::difference_type>(
sprout::container_traits<typename sprout::fixed::result_of::resize_backward<N, Container>::type>::static_size sprout::container_traits<typename sprout::fixed::result_of::resize_backward<N, Container>::type>::static_size

View file

@ -52,7 +52,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::set_impl<typename sprout::fixed::result_of::set<Container, T>::type>( return sprout::fixed::detail::set_impl<typename sprout::fixed::result_of::set<Container, T>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::set<Container, T>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::set<Container, T>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos), NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), pos),
v v
); );
@ -69,7 +69,7 @@ namespace sprout {
{ {
return sprout::fixed::detail::set_impl<typename sprout::fixed::result_of::set<Container, T>::type>( return sprout::fixed::detail::set_impl<typename sprout::fixed::result_of::set<Container, T>::type>(
cont, cont,
typename sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::set<Container, T>::type>::static_size>::type(), sprout::index_range<0, sprout::container_traits<typename sprout::fixed::result_of::set<Container, T>::type>::static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)),
v v
); );

View file

@ -4,6 +4,7 @@
#include <cstddef> #include <cstddef>
#include <sprout/config.hpp> #include <sprout/config.hpp>
#include <sprout/index_tuple.hpp> #include <sprout/index_tuple.hpp>
#include <sprout/string/char_traits.hpp>
#include <sprout/string/string.hpp> #include <sprout/string/string.hpp>
#include <sprout/utility/value_holder.hpp> #include <sprout/utility/value_holder.hpp>
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT #include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT
@ -12,14 +13,12 @@ namespace sprout {
// //
// shrink_string // shrink_string
// //
template<typename T, std::size_t N, typename Traits> template<typename T, std::size_t N, typename Traits = sprout::char_traits<T> >
class shrink_string { class shrink_string {
public: public:
typedef sprout::basic_string<T, N, Traits> string_type; typedef sprout::basic_string<T, N, Traits> string_type;
private: private:
typedef sprout::value_holder<string_type const&> holder_type; typedef sprout::value_holder<string_type const&> holder_type;
public:
typedef typename holder_type::param_type param_type;
private: private:
template<std::size_t M, sprout::index_t... Indexes> template<std::size_t M, sprout::index_t... Indexes>
static SPROUT_CONSTEXPR sprout::basic_string<T, sizeof...(Indexes), Traits> implicit_conversion_impl( static SPROUT_CONSTEXPR sprout::basic_string<T, sizeof...(Indexes), Traits> implicit_conversion_impl(
@ -35,9 +34,12 @@ namespace sprout {
public: public:
shrink_string(shrink_string const&) = default; shrink_string(shrink_string const&) = default;
shrink_string(shrink_string&&) = default; shrink_string(shrink_string&&) = default;
explicit SPROUT_CONSTEXPR shrink_string(param_type p) SPROUT_CONSTEXPR shrink_string(string_type const& s)
: holder_(p) : holder_(s)
{} {}
SPROUT_CONSTEXPR operator string_type const&() const {
return holder_.get();
}
template<std::size_t N2> template<std::size_t N2>
SPROUT_CONSTEXPR operator sprout::basic_string<T, N2, Traits>() const { SPROUT_CONSTEXPR operator sprout::basic_string<T, N2, Traits>() const {
return implicit_conversion_impl( return implicit_conversion_impl(

View file

@ -112,7 +112,7 @@ namespace sprout {
public: public:
static SPROUT_CONSTEXPR basic_string<T, N, Traits> from_c_str(value_type const* s, size_type n) { static SPROUT_CONSTEXPR basic_string<T, N, Traits> from_c_str(value_type const* s, size_type n) {
return !(N < n) return !(N < n)
? from_c_str_impl(s, n, typename sprout::index_range<0, N>::type()) ? from_c_str_impl(s, n, sprout::index_range<0, N>::make())
: throw std::out_of_range("basic_string<>: index out of range") : throw std::out_of_range("basic_string<>: index out of range")
; ;
} }
@ -357,7 +357,7 @@ namespace sprout {
return implicit_conversion_impl( return implicit_conversion_impl(
elems, elems,
len, len,
typename sprout::index_range<0, N2>::type() sprout::index_range<0, N2>::make()
); );
} }
pointer c_array() SPROUT_NOEXCEPT { pointer c_array() SPROUT_NOEXCEPT {
@ -522,7 +522,7 @@ namespace sprout {
} // namespace detail } // namespace detail
template<typename T, std::size_t N> template<typename T, std::size_t N>
inline SPROUT_CONSTEXPR sprout::basic_string<T, N - 1> to_string(T const(& arr)[N]) { inline SPROUT_CONSTEXPR sprout::basic_string<T, N - 1> to_string(T const(& arr)[N]) {
return sprout::detail::to_string_impl(arr, typename sprout::index_range<0, N - 1>::type()); return sprout::detail::to_string_impl(arr, sprout::index_range<0, N - 1>::make());
} }
// //

View file

@ -205,7 +205,7 @@ namespace sprout {
: impl_type( : impl_type(
array_tag(), array_tag(),
arr, arr,
typename sprout::index_range<0, static_size>::type(), sprout::index_range<0, static_size>::make(),
first, first,
last last
) )
@ -214,7 +214,7 @@ namespace sprout {
: impl_type( : impl_type(
array_tag(), array_tag(),
arr, arr,
typename sprout::index_range<0, static_size>::type(), sprout::index_range<0, static_size>::make(),
first, first,
last last
) )
@ -223,7 +223,7 @@ namespace sprout {
: impl_type( : impl_type(
array_tag(), array_tag(),
impl_type::template to_param<Container>(other.array_), impl_type::template to_param<Container>(other.array_),
typename sprout::index_range<0, static_size>::type(), sprout::index_range<0, static_size>::make(),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::begin(other.get_array()), first), NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::begin(other.get_array()), first),
NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::begin(other.get_array()), last) NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::begin(other.get_array()), last)
) )
@ -232,7 +232,7 @@ namespace sprout {
: impl_type( : impl_type(
array_tag(), array_tag(),
impl_type::template to_param<Container>(other.array_), impl_type::template to_param<Container>(other.array_),
typename sprout::index_range<0, static_size>::type(), sprout::index_range<0, static_size>::make(),
first + other.first_, first + other.first_,
last + other.first_ last + other.first_
) )

View file

@ -47,8 +47,8 @@ namespace sprout {
return sprout::tuples::detail::copy_impl<typename sprout::tuples::result_of::copy<Tuple, InputTuple>::type>( return sprout::tuples::detail::copy_impl<typename sprout::tuples::result_of::copy<Tuple, InputTuple>::type>(
t, t,
input, input,
typename sprout::index_range<sprout::tuples::tuple_size<InputTuple>::value, sprout::tuples::tuple_size<Tuple>::value>::type(), sprout::index_range<sprout::tuples::tuple_size<InputTuple>::value, sprout::tuples::tuple_size<Tuple>::value>::make(),
typename sprout::index_range<0, sprout::tuples::tuple_size<InputTuple>::value>::type() sprout::index_range<0, sprout::tuples::tuple_size<InputTuple>::value>::make()
); );
} }
template<typename Tuple, typename InputTuple> template<typename Tuple, typename InputTuple>
@ -64,7 +64,7 @@ namespace sprout {
t, t,
input, input,
sprout::index_tuple<>(), sprout::index_tuple<>(),
typename sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::type() sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::make()
); );
} }
} // namespace detail } // namespace detail

View file

@ -47,8 +47,8 @@ namespace sprout {
return sprout::tuples::detail::append_back_impl<typename sprout::tuples::result_of::append_back<Tuple, InputTuple>::type>( return sprout::tuples::detail::append_back_impl<typename sprout::tuples::result_of::append_back<Tuple, InputTuple>::type>(
t, t,
input, input,
typename sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::type(), sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::make(),
typename sprout::index_range<0, sprout::tuples::tuple_size<InputTuple>::value>::type() sprout::index_range<0, sprout::tuples::tuple_size<InputTuple>::value>::make()
); );
} }
} // namespace tuples } // namespace tuples

View file

@ -47,8 +47,8 @@ namespace sprout {
return sprout::tuples::detail::append_front_impl<typename sprout::tuples::result_of::append_front<Tuple, InputTuple>::type>( return sprout::tuples::detail::append_front_impl<typename sprout::tuples::result_of::append_front<Tuple, InputTuple>::type>(
t, t,
input, input,
typename sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::type(), sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::make(),
typename sprout::index_range<0, sprout::tuples::tuple_size<InputTuple>::value>::type() sprout::index_range<0, sprout::tuples::tuple_size<InputTuple>::value>::make()
); );
} }
} // namespace tuples } // namespace tuples

View file

@ -46,7 +46,7 @@ namespace sprout {
return sprout::tuples::detail::push_back_impl<typename sprout::tuples::result_of::push_back<Tuple, T>::type>( return sprout::tuples::detail::push_back_impl<typename sprout::tuples::result_of::push_back<Tuple, T>::type>(
t, t,
v, v,
typename sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::type() sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::make()
); );
} }
} // namespace tuples } // namespace tuples

View file

@ -46,7 +46,7 @@ namespace sprout {
return sprout::tuples::detail::push_front_impl<typename sprout::tuples::result_of::push_front<Tuple, T>::type>( return sprout::tuples::detail::push_front_impl<typename sprout::tuples::result_of::push_front<Tuple, T>::type>(
t, t,
v, v,
typename sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::type() sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>::make()
); );
} }
} // namespace tuples } // namespace tuples

View file

@ -53,7 +53,7 @@ namespace sprout {
sprout::types::detail::str_length<Sequence>::value sprout::types::detail::str_length<Sequence>::value
> to_string_constant() { > to_string_constant() {
return sprout::types::detail::to_string_constant_impl<Sequence>( return sprout::types::detail::to_string_constant_impl<Sequence>(
typename sprout::index_range<0, sprout::types::detail::str_length<Sequence>::value>::type() sprout::index_range<0, sprout::types::detail::str_length<Sequence>::value>::make()
); );
} }
} // namespace types } // namespace types

View file

@ -48,10 +48,10 @@
typename std::enable_if<SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_inherit_if_xxx_constant_def_impl_has_, CONSTANT), __LINE__)<T>::value>::type \ typename std::enable_if<SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_inherit_if_xxx_constant_def_impl_has_, CONSTANT), __LINE__)<T>::value>::type \
> { \ > { \
public: \ public: \
SPROUT_STATIC_CONSTEXPR decltype(T::CONSTANT) ALIAS = T::CONSTANT; \ SPROUT_STATIC_CONSTEXPR typename std::decay<decltype(T::CONSTANT)>::type ALIAS = T::CONSTANT; \
}; \ }; \
template<typename T> \ template<typename T> \
SPROUT_CONSTEXPR decltype(T::CONSTANT) NAME< \ SPROUT_CONSTEXPR typename std::decay<decltype(T::CONSTANT)>::type NAME< \
T, \ T, \
typename std::enable_if<SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_inherit_if_xxx_constant_def_impl_has_, CONSTANT), __LINE__)<T>::value>::type \ typename std::enable_if<SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_inherit_if_xxx_constant_def_impl_has_, CONSTANT), __LINE__)<T>::value>::type \
>::ALIAS >::ALIAS

View file

@ -38,7 +38,7 @@ namespace sprout {
{} {}
template<typename T, typename Index> template<typename T, typename Index>
SPROUT_CONSTEXPR variant_impl(T&& operand, Index) SPROUT_CONSTEXPR variant_impl(T&& operand, Index)
: tuple_(init(sprout::forward<T>(operand), typename sprout::index_range<0, Index::value>::type())) : tuple_(init(sprout::forward<T>(operand), sprout::index_range<0, Index::value>::make()))
, which_(Index::value) , which_(Index::value)
{ {
static_assert(Index::value < sizeof...(Types), "variant<>: invalid operand"); static_assert(Index::value < sizeof...(Types), "variant<>: invalid operand");