Use Boost.Config

This commit is contained in:
Vinnie Falco
2017-07-20 08:15:30 -07:00
parent f65a611b85
commit 0324dc371f
9 changed files with 34 additions and 31 deletions
+4 -2
View File
@@ -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
+3 -2
View File
@@ -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>
+1 -1
View File
@@ -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)