From d48c26220fd077ea48093b3724df481e2eabc661 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 20 Sep 2019 16:04:54 -0700 Subject: [PATCH] Workaround for allocator_traits --- include/boost/json/detail/storage_adaptor.hpp | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/include/boost/json/detail/storage_adaptor.hpp b/include/boost/json/detail/storage_adaptor.hpp index 008fec1c..28b6cc2d 100644 --- a/include/boost/json/detail/storage_adaptor.hpp +++ b/include/boost/json/detail/storage_adaptor.hpp @@ -11,24 +11,39 @@ #define BOOST_JSON_DETAIL_STORAGE_ADAPTOR_HPP #include -#include #include #include -#include #include +#include +#include #include #include +#ifdef BOOST_NO_CXX11_ALLOCATOR +#include +#else +#include +#endif + namespace boost { namespace beast { namespace json { namespace detail { +#ifdef BOOST_NO_CXX11_ALLOCATOR template using allocator_of_char = - typename beast::detail::allocator_traits< + typename boost::container::allocator_traits< Allocator>::template rebind_alloc; +#else +template +using allocator_of_char = + typename std::allocator_traits< + Allocator>::template rebind_alloc; + +#endif + template struct storage_adaptor : boost::empty_value<