mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
add tpp one_of
This commit is contained in:
parent
2b366b5f03
commit
ac80a04970
5 changed files with 94 additions and 9 deletions
|
@ -7,9 +7,13 @@
|
|||
namespace sprout {
|
||||
namespace tpp {
|
||||
namespace detail {
|
||||
template<bool Head, bool... Tail>
|
||||
template<bool... Values>
|
||||
struct all_of_impl;
|
||||
template<>
|
||||
struct all_of_impl<>
|
||||
: public std::true_type
|
||||
{};
|
||||
template<>
|
||||
struct all_of_impl<true>
|
||||
: public std::true_type
|
||||
{};
|
||||
|
@ -27,12 +31,19 @@ namespace sprout {
|
|||
{};
|
||||
} // namespace detail
|
||||
//
|
||||
// all_of
|
||||
// all_of_c
|
||||
//
|
||||
template<bool... Values>
|
||||
struct all_of
|
||||
struct all_of_c
|
||||
: public sprout::tpp::detail::all_of_impl<Values...>
|
||||
{};
|
||||
//
|
||||
// all_of
|
||||
//
|
||||
template<typename... Types>
|
||||
struct all_of
|
||||
: public sprout::tpp::all_of_c<Types::value...>
|
||||
{};
|
||||
} // namespace tpp
|
||||
} // namespace sprout
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue