Resolve g++ compilation error when using standalone asio
This commit is contained in:
parent
ec240ab432
commit
1a56f4810e
2 changed files with 5 additions and 2 deletions
|
|
@ -7,7 +7,6 @@
|
||||||
#include <asio.hpp>
|
#include <asio.hpp>
|
||||||
#include <asio/steady_timer.hpp>
|
#include <asio/steady_timer.hpp>
|
||||||
namespace SimpleWeb {
|
namespace SimpleWeb {
|
||||||
namespace asio = asio;
|
|
||||||
using error_code = std::error_code;
|
using error_code = std::error_code;
|
||||||
using errc = std::errc;
|
using errc = std::errc;
|
||||||
using system_error = std::system_error;
|
using system_error = std::system_error;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@
|
||||||
#include "server_http.hpp"
|
#include "server_http.hpp"
|
||||||
#include <future>
|
#include <future>
|
||||||
|
|
||||||
|
#ifndef USE_STANDALONE_ASIO
|
||||||
|
namespace asio = boost::asio;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
using HttpServer = SimpleWeb::Server<SimpleWeb::HTTP>;
|
using HttpServer = SimpleWeb::Server<SimpleWeb::HTTP>;
|
||||||
|
|
@ -359,7 +363,7 @@ int main() {
|
||||||
}
|
}
|
||||||
else if(call_num == 3) {
|
else if(call_num == 3) {
|
||||||
ASSERT(response->content.string().empty());
|
ASSERT(response->content.string().empty());
|
||||||
ASSERT(ec == SimpleWeb::asio::error::eof);
|
ASSERT(ec == asio::error::eof);
|
||||||
}
|
}
|
||||||
++call_num;
|
++call_num;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue