From 1a56f4810e4e54c4410d56232c2b7e13af0de537 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 23 Jun 2019 13:05:26 +0200 Subject: [PATCH] Resolve g++ compilation error when using standalone asio --- asio_compatibility.hpp | 1 - tests/io_test.cpp | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/asio_compatibility.hpp b/asio_compatibility.hpp index 4738ae4..8b6c7ed 100644 --- a/asio_compatibility.hpp +++ b/asio_compatibility.hpp @@ -7,7 +7,6 @@ #include #include namespace SimpleWeb { - namespace asio = asio; using error_code = std::error_code; using errc = std::errc; using system_error = std::system_error; diff --git a/tests/io_test.cpp b/tests/io_test.cpp index 67a6fb8..da71e0e 100644 --- a/tests/io_test.cpp +++ b/tests/io_test.cpp @@ -3,6 +3,10 @@ #include "server_http.hpp" #include +#ifndef USE_STANDALONE_ASIO +namespace asio = boost::asio; +#endif + using namespace std; using HttpServer = SimpleWeb::Server; @@ -359,7 +363,7 @@ int main() { } else if(call_num == 3) { ASSERT(response->content.string().empty()); - ASSERT(ec == SimpleWeb::asio::error::eof); + ASSERT(ec == asio::error::eof); } ++call_num; });