forked from boostorg/beast
Use Boost.Config
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning (push)
|
||||
# pragma warning (disable: 4127) // conditional expression is constant
|
||||
# pragma warning (disable: 4244) // integer conversion, possible loss of data
|
||||
@@ -18,7 +20,7 @@
|
||||
|
||||
#include "nodejs-parser/http_parser.c"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning (pop)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <beast/core.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@@ -191,7 +192,7 @@ print_response(SyncReadStream& stream)
|
||||
|
||||
//]
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef BOOST_MSVC
|
||||
//[http_snippet_14
|
||||
|
||||
template<bool isRequest, class Body, class Fields>
|
||||
@@ -257,7 +258,7 @@ print(message<isRequest, Body, Fields> const& m)
|
||||
|
||||
//]
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if BOOST_MSVC
|
||||
//[http_snippet_16
|
||||
|
||||
template<bool isRequest, class Body, class Fields>
|
||||
|
||||
@@ -217,7 +217,7 @@ boost::asio::ip::tcp::socket sock{ios};
|
||||
} // fxx()
|
||||
|
||||
// workaround for https://github.com/chriskohlhoff/asio/issues/112
|
||||
#ifdef _MSC_VER
|
||||
#ifdef BOOST_MSVC
|
||||
//[ws_snippet_21
|
||||
void echo(stream<boost::asio::ip::tcp::socket>& ws,
|
||||
multi_buffer& buffer, boost::asio::yield_context yield)
|
||||
|
||||
Reference in New Issue
Block a user