tinympl  0.2
mini MPL library for C++11
none_of.hpp
1 // Copyright (C) 2013, Ennio Barbaro.
2 //
3 // Use, modification, and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://sbabbi.github.io/tinympl for documentation.
8 //
9 // You are welcome to contact the author at:
10 // enniobarbaro@gmail.com
11 //
12 
13 #ifndef TINYMPL_VARIADIC_NONE_OF_HPP
14 #define TINYMPL_VARIADIC_NONE_OF_HPP
15 
16 #include <type_traits>
17 
18 namespace tinympl {
19 namespace variadic {
20 
32 template< template<class ... T> class F, class ... Args> struct none_of;
33 
34 template< template<class ... T> class F, class Head, class ... Args>
35 struct none_of<F, Head, Args...> :
36  std::conditional <
37  F<Head>::type::value,
38  std::integral_constant<bool, false>,
39  typename none_of<F, Args...>::type >::type
40 {};
41 
42 template< template<class ... T> class F> struct none_of<F> :
43  std::integral_constant<bool, true>
44 {};
45 
46 
47 } // namespace variadic
48 } // namespace tinympl
49 
50 #endif // TINYMPL_VARIADIC_NONE_OF_HPP
Determines whether none of the elements in the sequence satisfy the given predicate.
Definition: none_of.hpp:32