Require Boost 1.58 or later

This commit is contained in:
Vinnie Falco
2017-05-23 11:26:28 -07:00
parent 929174d4d8
commit e86ca5d66b
5 changed files with 45 additions and 3 deletions

View File

@ -11,8 +11,8 @@ env:
# to boost's .tar.gz.
- LCOV_ROOT=$HOME/lcov
- VALGRIND_ROOT=$HOME/valgrind-install
- BOOST_ROOT=$HOME/boost_1_64_0
- BOOST_URL='http://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.gz'
- BOOST_ROOT=$HOME/boost_1_58_0
- BOOST_URL='http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz'
addons:
apt:

View File

@ -2,6 +2,7 @@ Version 44
* Use BOOST_THROW_EXCEPTION
* Tidy up read_size_helper and dynamic buffers
* Require Boost 1.58.0 or later
--------------------------------------------------------------------------------

View File

@ -76,7 +76,7 @@ The library has been submitted to the
## Requirements
* Boost 1.64.0 or later
* Boost 1.58.0 or later
* C++11 or later
When using Microsoft Visual C++, Visual Studio 2015 Update 3 or later is required.

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>

View File

@ -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