1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

add bool_constant [N4334]

This commit is contained in:
bolero-MURAKAMI 2014-12-10 19:54:12 +09:00
parent fbb95d9068
commit a1f6d6ffc3
35 changed files with 198 additions and 106 deletions

View file

@ -238,8 +238,7 @@ namespace sprout {
template<typename... UTypes>
struct is_fixedly_convert_constructible
: public sprout::integral_constant<
bool,
: public sprout::bool_constant<
(sizeof...(UTypes) == sizeof...(Types) && is_flexibly_convert_constructible<UTypes...>::value)
>
{};
@ -270,8 +269,7 @@ namespace sprout {
template<typename... UTypes>
struct is_fixedly_assignable
: public sprout::integral_constant<
bool,
: public sprout::bool_constant<
(sizeof...(UTypes) == sizeof...(Types) && is_flexibly_assignable<UTypes...>::value)
>
{};

View file

@ -31,7 +31,7 @@ namespace sprout {
{};
template<std::size_t I, typename T>
struct valid_tuple_index<I, T, true>
: public sprout::integral_constant<bool, (I < std::tuple_size<T>::value)>
: public sprout::bool_constant<(I < std::tuple_size<T>::value)>
{};
template<std::size_t I, typename T, bool = sprout::has_type<std::tuple_element<I, T> >::value && sprout::tuples::detail::valid_tuple_index<I, T>::value>