forked from boostorg/type_traits
Add make_void and void_t traits
This commit is contained in:
1 parent
4fffc7637d
commit
d24f722c5a
5 files changed
+125
No files matched your search
@@ -130,6 +130,7 @@
|
||||
#include <boost/type_traits/is_volatile.hpp>
|
||||
#include <boost/type_traits/make_signed.hpp>
|
||||
#include <boost/type_traits/make_unsigned.hpp>
|
||||
#include <boost/type_traits/make_void.hpp>
|
||||
#include <boost/type_traits/rank.hpp>
|
||||
#include <boost/type_traits/remove_all_extents.hpp>
|
||||
#include <boost/type_traits/remove_bounds.hpp>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2017 Glen Joseph Fernandes
|
||||
<glenjofe -at- gmail.com>
|
||||
|
||||
Distributed under the Boost Software License,
|
||||
Version 1.0. (See accompanying file LICENSE_1_0.txt
|
||||
or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_TT_MAKE_VOID_HPP_INCLUDED
|
||||
#define BOOST_TT_MAKE_VOID_HPP_INCLUDED
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
template<class...>
|
||||
struct make_void {
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
template<class... Ts>
|
||||
using void_t = typename make_void<Ts...>::type;
|
||||
#endif
|
||||
#else
|
||||
template<class>
|
||||
struct make_void {
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
template<class T>
|
||||
using void_t = typename make_void<T>::type;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
} /* boost */
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user