diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f3ded06..6ee0a388 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Version 242: * test::stream has deprecated lowest_layer for ssl * MSVC uses ::fopen_s * Fix http::message constructor constraint +* Check defined(BOOST_MSVC) -------------------------------------------------------------------------------- diff --git a/example/advanced/server-flex/advanced_server_flex.cpp b/example/advanced/server-flex/advanced_server_flex.cpp index c65d3182..af2ada61 100644 --- a/example/advanced/server-flex/advanced_server_flex.cpp +++ b/example/advanced/server-flex/advanced_server_flex.cpp @@ -88,7 +88,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/advanced/server/advanced_server.cpp b/example/advanced/server/advanced_server.cpp index 13be92ef..f1adbee6 100644 --- a/example/advanced/server/advanced_server.cpp +++ b/example/advanced/server/advanced_server.cpp @@ -83,7 +83,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/http/server/async-ssl/http_server_async_ssl.cpp b/example/http/server/async-ssl/http_server_async_ssl.cpp index 3bb8a415..f51d445c 100644 --- a/example/http/server/async-ssl/http_server_async_ssl.cpp +++ b/example/http/server/async-ssl/http_server_async_ssl.cpp @@ -82,7 +82,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/http/server/async/http_server_async.cpp b/example/http/server/async/http_server_async.cpp index 95493aa0..e02ec231 100644 --- a/example/http/server/async/http_server_async.cpp +++ b/example/http/server/async/http_server_async.cpp @@ -78,7 +78,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/http/server/coro-ssl/http_server_coro_ssl.cpp b/example/http/server/coro-ssl/http_server_coro_ssl.cpp index 06f12603..d0c7e85e 100644 --- a/example/http/server/coro-ssl/http_server_coro_ssl.cpp +++ b/example/http/server/coro-ssl/http_server_coro_ssl.cpp @@ -81,7 +81,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/http/server/coro/http_server_coro.cpp b/example/http/server/coro/http_server_coro.cpp index 6e75c54a..1c3f440b 100644 --- a/example/http/server/coro/http_server_coro.cpp +++ b/example/http/server/coro/http_server_coro.cpp @@ -78,7 +78,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/http/server/flex/http_server_flex.cpp b/example/http/server/flex/http_server_flex.cpp index c4cac9fd..e535bdc4 100644 --- a/example/http/server/flex/http_server_flex.cpp +++ b/example/http/server/flex/http_server_flex.cpp @@ -81,7 +81,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/http/server/stackless-ssl/http_server_stackless_ssl.cpp b/example/http/server/stackless-ssl/http_server_stackless_ssl.cpp index c05c66cb..17568d53 100644 --- a/example/http/server/stackless-ssl/http_server_stackless_ssl.cpp +++ b/example/http/server/stackless-ssl/http_server_stackless_ssl.cpp @@ -83,7 +83,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/http/server/stackless/http_server_stackless.cpp b/example/http/server/stackless/http_server_stackless.cpp index 059ff934..eb17f4af 100644 --- a/example/http/server/stackless/http_server_stackless.cpp +++ b/example/http/server/stackless/http_server_stackless.cpp @@ -79,7 +79,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/http/server/sync-ssl/http_server_sync_ssl.cpp b/example/http/server/sync-ssl/http_server_sync_ssl.cpp index 4fdd2d76..34b27753 100644 --- a/example/http/server/sync-ssl/http_server_sync_ssl.cpp +++ b/example/http/server/sync-ssl/http_server_sync_ssl.cpp @@ -80,7 +80,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/http/server/sync/http_server_sync.cpp b/example/http/server/sync/http_server_sync.cpp index b6d49cdf..2c5ca60f 100644 --- a/example/http/server/sync/http_server_sync.cpp +++ b/example/http/server/sync/http_server_sync.cpp @@ -77,7 +77,7 @@ path_cat( if (base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/example/websocket/server/chat-multi/http_session.cpp b/example/websocket/server/chat-multi/http_session.cpp index 07921785..9d4dee87 100644 --- a/example/websocket/server/chat-multi/http_session.cpp +++ b/example/websocket/server/chat-multi/http_session.cpp @@ -62,7 +62,7 @@ path_cat( if(base.empty()) return std::string(path); std::string result(base); -#if BOOST_MSVC +#ifdef BOOST_MSVC char constexpr path_separator = '\\'; if(result.back() == path_separator) result.resize(result.size() - 1); diff --git a/include/boost/beast/_experimental/unit_test/main.ipp b/include/boost/beast/_experimental/unit_test/main.ipp index fa696940..0a4d4c55 100644 --- a/include/boost/beast/_experimental/unit_test/main.ipp +++ b/include/boost/beast/_experimental/unit_test/main.ipp @@ -38,7 +38,7 @@ int main(int ac, char const* av[]) dstream log(std::cerr); std::unitbuf(log); -#if BOOST_MSVC +#ifdef BOOST_MSVC { int flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); flags |= _CRTDBG_LEAK_CHECK_DF; diff --git a/test/doc/http_snippets.cpp b/test/doc/http_snippets.cpp index 3811514e..f7fc4e30 100644 --- a/test/doc/http_snippets.cpp +++ b/test/doc/http_snippets.cpp @@ -417,7 +417,7 @@ print(message const& m) //] -#if BOOST_MSVC +#ifdef BOOST_MSVC //[http_snippet_16 template