echelon  0.8.0
all_integral.hpp
1 // Copyright (c) 2012-2014 Christopher Hinz
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #ifndef ECHELON_DETAIL_ALL_INTEGRAL_HPP
7 #define ECHELON_DETAIL_ALL_INTEGRAL_HPP
8 
9 #include <type_traits>
10 
11 namespace echelon
12 {
13 namespace detail
14 {
15 
16 template <typename... T>
17 struct and_;
18 
19 template <typename Front>
20 struct and_<Front> : std::integral_constant<bool, Front::value>
21 {
22 };
23 
24 template <typename Front, typename... Tail>
25 struct and_<Front, Tail...> : std::integral_constant<bool, Front::value&& and_<Tail...>::value>
26 {
27 };
28 
29 template <typename... T>
30 struct all_integral : and_<std::is_integral<typename std::remove_reference<T>::type>...>
31 {
32 };
33 }
34 }
35 
36 #endif
echelon&#39;s core namespace
Definition: attribute.cpp:10