From 874bbd0b8ab3fb649b7f4f3414fd73aa4647f748 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 30 Mar 2016 09:16:06 -0400 Subject: [PATCH] C++17 compatibility: * std::void_t * std::bool_constant --- beast/{cxx14 => cxx17}/type_traits.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) rename beast/{cxx14 => cxx17}/type_traits.h (87%) diff --git a/beast/cxx14/type_traits.h b/beast/cxx17/type_traits.h similarity index 87% rename from beast/cxx14/type_traits.h rename to beast/cxx17/type_traits.h index be11f51f9..31bec59f6 100644 --- a/beast/cxx14/type_traits.h +++ b/beast/cxx17/type_traits.h @@ -17,8 +17,8 @@ */ //============================================================================== -#ifndef BEAST_CXX14_TYPE_TRAITS_H_INCLUDED -#define BEAST_CXX14_TYPE_TRAITS_H_INCLUDED +#ifndef BEAST_CXX17_TYPE_TRAITS_H_INCLUDED +#define BEAST_CXX17_TYPE_TRAITS_H_INCLUDED #include #include @@ -26,6 +26,16 @@ namespace std { +#ifndef _MSC_VER + +template +using void_t = void; + +template +using bool_constant = std::integral_constant; + +#endif + // Ideas from Howard Hinnant // // Specializations of is_constructible for pair and tuple which @@ -41,6 +51,6 @@ struct is_constructible > { }; -} +} // std #endif