mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
add bool_constant [N4334]
This commit is contained in:
parent
fbb95d9068
commit
a1f6d6ffc3
35 changed files with 198 additions and 106 deletions
|
@ -19,12 +19,11 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename Tup, std::size_t First, std::size_t Last, bool = (Last - First == 1)>
|
||||
struct none_of_impl
|
||||
: public sprout::integral_constant<bool, !std::tuple_element<First, Tup>::type::value>
|
||||
: public sprout::bool_constant<!std::tuple_element<First, Tup>::type::value>
|
||||
{};
|
||||
template<typename Tup, std::size_t First, std::size_t Last>
|
||||
struct none_of_impl<Tup, First, Last, false>
|
||||
: public sprout::integral_constant<
|
||||
bool,
|
||||
: public sprout::bool_constant<
|
||||
sprout::tpp::detail::none_of_impl<Tup, First, (First + Last) / 2>::value
|
||||
&& sprout::tpp::detail::none_of_impl<Tup, (First + Last) / 2, Last>::value
|
||||
>
|
||||
|
@ -46,7 +45,7 @@ namespace sprout {
|
|||
//
|
||||
template<bool... Values>
|
||||
struct none_of_c
|
||||
: public sprout::tpp::none_of<sprout::integral_constant<bool, Values>...>
|
||||
: public sprout::tpp::none_of<sprout::bool_constant<Values>...>
|
||||
{};
|
||||
} // namespace tpp
|
||||
} // namespace sprout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue