C++17 compatibility:

* std::void_t
* std::bool_constant
This commit is contained in:
Vinnie Falco
2016-03-30 09:16:06 -04:00
parent 08171dad5e
commit 73ddda4651
4 changed files with 19 additions and 11 deletions

View File

@@ -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 <tuple>
#include <type_traits>
@@ -26,6 +26,16 @@
namespace std {
#ifndef _MSC_VER
template<class...>
using void_t = void;
template<bool B>
using bool_constant = std::integral_constant<bool, B>;
#endif
// Ideas from Howard Hinnant
//
// Specializations of is_constructible for pair and tuple which
@@ -41,6 +51,6 @@ struct is_constructible <pair <T, U>>
{
};
}
} // std
#endif

View File

@@ -25,8 +25,6 @@
#include <ripple/beast/container/aged_container.h>
#include <beast/clock/abstract_clock.h>
#include <beast/empty_base_optimization.h>
#include <beast/empty_base_optimization.h>
#include <beast/cxx14/type_traits.h>
#include <boost/intrusive/list.hpp>
#include <boost/intrusive/set.hpp>
#include <boost/version.hpp>
@@ -35,7 +33,7 @@
#include <initializer_list>
#include <iterator>
#include <memory>
#include <type_traits>
#include <beast/cxx17/type_traits.h> // <type_traits>
#include <utility>
namespace beast {