add tpp one_of

This commit is contained in:
bolero-MURAKAMI 2012-11-02 22:00:10 +09:00
parent 2b366b5f03
commit ac80a04970
5 changed files with 94 additions and 9 deletions

View file

@ -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