1 | /* |
2 | Copyright 2017 Glen Joseph Fernandes |
3 | (glenjofe@gmail.com) |
4 | |
5 | Distributed under the Boost Software License, |
6 | Version 1.0. (See accompanying file LICENSE_1_0.txt |
7 | or copy at http://www.boost.org/LICENSE_1_0.txt) |
8 | */ |
9 | |
10 | #ifndef BOOST_TT_MAKE_VOID_HPP_INCLUDED |
11 | #define BOOST_TT_MAKE_VOID_HPP_INCLUDED |
12 | |
13 | #include <boost/config.hpp> |
14 | |
15 | namespace boost { |
16 | |
17 | #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) |
18 | template<class...> |
19 | struct make_void { |
20 | typedef void type; |
21 | }; |
22 | |
23 | #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) |
24 | template<class... Ts> |
25 | using void_t = typename make_void<Ts...>::type; |
26 | #endif |
27 | |
28 | #else /* BOOST_NO_CXX11_VARIADIC_TEMPLATES */ |
29 | |
30 | template<class = void, |
31 | class = void, |
32 | class = void, |
33 | class = void, |
34 | class = void> |
35 | struct make_void { |
36 | typedef void type; |
37 | }; |
38 | |
39 | #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) |
40 | template<class A = void, |
41 | class B = void, |
42 | class C = void, |
43 | class D = void, |
44 | class E = void> |
45 | using void_t = typename make_void<A, B, C, D, E>::type; |
46 | #endif |
47 | |
48 | #endif |
49 | |
50 | } /* boost */ |
51 | |
52 | #endif |
53 | |