Skip to content

Commit

Permalink
Define GET_IO_SERVICE once
Browse files Browse the repository at this point in the history
  • Loading branch information
bugdea1er authored and gittiver committed Apr 19, 2024
1 parent e3ff923 commit 3e9eb11
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions include/crow/socket_adaptors.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
#ifdef CROW_ENABLE_SSL
#include <boost/asio/ssl.hpp>
#endif
#if BOOST_VERSION >= 107000
#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
#else
#define GET_IO_SERVICE(s) ((s).get_io_service())
#endif
#else
#ifndef ASIO_STANDALONE
#define ASIO_STANDALONE
Expand All @@ -20,13 +15,14 @@
#ifdef CROW_ENABLE_SSL
#include <asio/ssl.hpp>
#endif
#if ASIO_VERSION >= 101300 // 1.13.0
#endif
#include "crow/settings.h"

#if (CROW_USE_BOOST && BOOST_VERSION >= 107000) || (ASIO_VERSION >= 101300)
#define GET_IO_SERVICE(s) ((asio::io_context&)(s).get_executor().context())
#else
#define GET_IO_SERVICE(s) ((s).get_io_service())
#endif
#endif
#include "crow/settings.h"

namespace crow
{
Expand Down

0 comments on commit 3e9eb11

Please sign in to comment.