diff options
Diffstat (limited to 'boost/type_traits')
-rw-r--r-- | boost/type_traits/detail/common_arithmetic_type.hpp | 6 | ||||
-rw-r--r-- | boost/type_traits/is_rvalue_reference.hpp | 2 | ||||
-rw-r--r-- | boost/type_traits/make_void.hpp | 52 |
3 files changed, 56 insertions, 4 deletions
diff --git a/boost/type_traits/detail/common_arithmetic_type.hpp b/boost/type_traits/detail/common_arithmetic_type.hpp index 8c091583c5..a7aff03929 100644 --- a/boost/type_traits/detail/common_arithmetic_type.hpp +++ b/boost/type_traits/detail/common_arithmetic_type.hpp @@ -46,7 +46,7 @@ template<> struct arithmetic_type<3> #endif // There are five standard signed integer types: -// “signed char”, “short int”, “int”, “long int”, and “long long int”. +// "signed char", "short int", "int", "long int", and "long long int". template<> struct arithmetic_type<4> { @@ -79,8 +79,8 @@ template<> struct arithmetic_type<8> }; // For each of the standard signed integer types, there exists a corresponding -// (but different) standard unsigned integer type: “unsigned char”, “unsigned short int”, -// “unsigned int”, “unsigned long int”, and “unsigned long long int” +// (but different) standard unsigned integer type: "unsigned char", "unsigned short int", +// "unsigned int", "unsigned long int", and "unsigned long long int" template<> struct arithmetic_type<9> { diff --git a/boost/type_traits/is_rvalue_reference.hpp b/boost/type_traits/is_rvalue_reference.hpp index 50e88edee0..a48edb5140 100644 --- a/boost/type_traits/is_rvalue_reference.hpp +++ b/boost/type_traits/is_rvalue_reference.hpp @@ -1,5 +1,5 @@ -// (C) John Maddock 2010. +// (C) Copyright John Maddock 2010. // Use, modification and distribution are subject to 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). diff --git a/boost/type_traits/make_void.hpp b/boost/type_traits/make_void.hpp new file mode 100644 index 0000000000..f48823b059 --- /dev/null +++ b/boost/type_traits/make_void.hpp @@ -0,0 +1,52 @@ +/* +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 /* BOOST_NO_CXX11_VARIADIC_TEMPLATES */ + +template<class = void, + class = void, + class = void, + class = void, + class = void> +struct make_void { + typedef void type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template<class A = void, + class B = void, + class C = void, + class D = void, + class E = void> +using void_t = typename make_void<A, B, C, D, E>::type; +#endif + +#endif + +} /* boost */ + +#endif |