Require Boost 1.58 or later

This commit is contained in:
Vinnie Falco
2017-07-20 08:12:17 -07:00
parent 929174d4d8
commit e86ca5d66b
5 changed files with 45 additions and 3 deletions
+1
View File
@@ -9,6 +9,7 @@
#define BEAST_CONSUMING_BUFFERS_HPP
#include <beast/config.hpp>
#include <beast/core/detail/in_place_init.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/optional.hpp>
#include <cstdint>
@@ -0,0 +1,40 @@
//
// Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot 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 BEAST_DETAIL_IN_PLACE_INIT_HPP
#define BEAST_DETAIL_IN_PLACE_INIT_HPP
#include <boost/version.hpp>
// Provide boost::in_place_init_t and boost::in_place_init
// for Boost versions earlier than 1.63.0.
#if BOOST_VERSION < 106300
namespace boost {
namespace optional_ns {
// a tag for in-place initialization of contained value
struct in_place_init_t
{
struct init_tag{};
explicit in_place_init_t(init_tag){}
};
const in_place_init_t in_place_init ((in_place_init_t::init_tag()));
} // namespace optional_ns
using optional_ns::in_place_init_t;
using optional_ns::in_place_init;
}
#endif
#endif