Skip to content

Commit 3e9eb11

Browse files
bugdea1ergittiver
authored andcommitted
Define GET_IO_SERVICE once
1 parent e3ff923 commit 3e9eb11

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

include/crow/socket_adaptors.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
#ifdef CROW_ENABLE_SSL
77
#include <boost/asio/ssl.hpp>
88
#endif
9-
#if BOOST_VERSION >= 107000
10-
#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
11-
#else
12-
#define GET_IO_SERVICE(s) ((s).get_io_service())
13-
#endif
149
#else
1510
#ifndef ASIO_STANDALONE
1611
#define ASIO_STANDALONE
@@ -20,13 +15,14 @@
2015
#ifdef CROW_ENABLE_SSL
2116
#include <asio/ssl.hpp>
2217
#endif
23-
#if ASIO_VERSION >= 101300 // 1.13.0
18+
#endif
19+
#include "crow/settings.h"
20+
21+
#if (CROW_USE_BOOST && BOOST_VERSION >= 107000) || (ASIO_VERSION >= 101300)
2422
#define GET_IO_SERVICE(s) ((asio::io_context&)(s).get_executor().context())
2523
#else
2624
#define GET_IO_SERVICE(s) ((s).get_io_service())
2725
#endif
28-
#endif
29-
#include "crow/settings.h"
3026

3127
namespace crow
3228
{

0 commit comments

Comments
 (0)