Resolve g++ compilation error when using standalone asio

This commit is contained in:
eidheim 2019-06-23 13:05:26 +02:00
commit 1a56f4810e
2 changed files with 5 additions and 2 deletions

View file

@ -7,7 +7,6 @@
#include <asio.hpp>
#include <asio/steady_timer.hpp>
namespace SimpleWeb {
namespace asio = asio;
using error_code = std::error_code;
using errc = std::errc;
using system_error = std::system_error;

View file

@ -3,6 +3,10 @@
#include "server_http.hpp"
#include <future>
#ifndef USE_STANDALONE_ASIO
namespace asio = boost::asio;
#endif
using namespace std;
using HttpServer = SimpleWeb::Server<SimpleWeb::HTTP>;
@ -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;
});