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.
|
# to boost's .tar.gz.
|
||||||
- LCOV_ROOT=$HOME/lcov
|
- LCOV_ROOT=$HOME/lcov
|
||||||
- VALGRIND_ROOT=$HOME/valgrind-install
|
- VALGRIND_ROOT=$HOME/valgrind-install
|
||||||
- BOOST_ROOT=$HOME/boost_1_64_0
|
- BOOST_ROOT=$HOME/boost_1_58_0
|
||||||
- BOOST_URL='http://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.gz'
|
- BOOST_URL='http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz'
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
@@ -3,6 +3,7 @@ Version 68:
|
|||||||
* Split common tests to a new project
|
* Split common tests to a new project
|
||||||
* Small speed up in fields comparisons
|
* Small speed up in fields comparisons
|
||||||
* Adjust buffer size in fast server
|
* Adjust buffer size in fast server
|
||||||
|
* Use string_ref in older Boost versions
|
||||||
|
|
||||||
API Changes:
|
API Changes:
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ endif()
|
|||||||
option (Boost_USE_STATIC_LIBS "Use static libraries for boost" ON)
|
option (Boost_USE_STATIC_LIBS "Use static libraries for boost" ON)
|
||||||
|
|
||||||
set (BOOST_COMPONENTS coroutine context filesystem program_options system thread)
|
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})
|
link_directories(${Boost_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
@@ -8,11 +8,34 @@
|
|||||||
#ifndef BEAST_STRING_HPP
|
#ifndef BEAST_STRING_HPP
|
||||||
#define 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>
|
#include <boost/utility/string_view.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
namespace beast {
|
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
|
/// The type of string view used by the library
|
||||||
using string_view = boost::string_view;
|
using string_view = boost::string_view;
|
||||||
|
|
||||||
@@ -20,6 +43,7 @@ using string_view = boost::string_view;
|
|||||||
template<class CharT, class Traits>
|
template<class CharT, class Traits>
|
||||||
using basic_string_view =
|
using basic_string_view =
|
||||||
boost::basic_string_view<CharT, Traits>;
|
boost::basic_string_view<CharT, Traits>;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user