mirror of
https://github.com/boostorg/beast.git
synced 2025-08-01 22:04:34 +02:00
@@ -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:
|
||||
|
@@ -3,6 +3,7 @@ Version 68:
|
||||
* Split common tests to a new project
|
||||
* Small speed up in fields comparisons
|
||||
* Adjust buffer size in fast server
|
||||
* Use string_ref in older Boost versions
|
||||
|
||||
API Changes:
|
||||
|
||||
|
@@ -48,7 +48,7 @@ endif()
|
||||
option (Boost_USE_STATIC_LIBS "Use static libraries for boost" ON)
|
||||
|
||||
set (BOOST_COMPONENTS coroutine context filesystem program_options system thread)
|
||||
find_package (Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
find_package (Boost 1.58.0 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
|
||||
|
@@ -8,11 +8,34 @@
|
||||
#ifndef BEAST_STRING_HPP
|
||||
#define BEAST_STRING_HPP
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#ifndef BEAST_NO_BOOST_STRING_VIEW
|
||||
# if BOOST_VERSION >= 106400
|
||||
# define BEAST_NO_BOOST_STRING_VIEW 0
|
||||
# else
|
||||
# define BEAST_NO_BOOST_STRING_VIEW 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BEAST_NO_BOOST_STRING_VIEW
|
||||
#include <boost/utility/string_ref.hpp>
|
||||
#else
|
||||
#include <boost/utility/string_view.hpp>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace beast {
|
||||
|
||||
#if BEAST_NO_BOOST_STRING_VIEW
|
||||
/// The type of string view used by the library
|
||||
using string_view = boost::string_ref;
|
||||
|
||||
/// The type of basic string view used by the library
|
||||
template<class CharT, class Traits>
|
||||
using basic_string_view =
|
||||
boost::basic_string_ref<CharT, Traits>;
|
||||
#else
|
||||
/// The type of string view used by the library
|
||||
using string_view = boost::string_view;
|
||||
|
||||
@@ -20,6 +43,7 @@ using string_view = boost::string_view;
|
||||
template<class CharT, class Traits>
|
||||
using basic_string_view =
|
||||
boost::basic_string_view<CharT, Traits>;
|
||||
#endif
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
Reference in New Issue
Block a user