Goby3 3.2.3
2025.05.13
Loading...
Searching...
No Matches
asio_compat.h
Go to the documentation of this file.
1// Copyright 2012-2021:
2// GobySoft, LLC (2013-)
3// Massachusetts Institute of Technology (2007-2014)
4// Community contributors (see AUTHORS file)
5// File authors:
6// Toby Schneider <toby@gobysoft.org>
7//
8//
9// This file is part of the Goby Underwater Autonomy Project Libraries
10// ("The Goby Libraries").
11//
12// The Goby Libraries are free software: you can redistribute them and/or modify
13// them under the terms of the GNU Lesser General Public License as published by
14// the Free Software Foundation, either version 2.1 of the License, or
15// (at your option) any later version.
16//
17// The Goby Libraries are distributed in the hope that they will be useful,
18// but WITHOUT ANY WARRANTY; without even the implied warranty of
19// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20// GNU Lesser General Public License for more details.
21//
22// You should have received a copy of the GNU Lesser General Public License
23// along with Goby. If not, see <http://www.gnu.org/licenses/>.
24
25#ifndef GOBY_UTIL_ASIO_COMPAT_H
26#define GOBY_UTIL_ASIO_COMPAT_H
27
28#include <boost/version.hpp>
29
30// manage the switch from ASIO io_service to io_context introduced in Boost 1.66 but functions were not reworked until 1.70
31#if BOOST_VERSION < 107000
32#include <boost/asio/io_service.hpp>
33#define USE_BOOST_IO_SERVICE
34#else
35#include <boost/asio/io_context.hpp>
36#endif
37
38// also typedef new names
39#if BOOST_VERSION < 106600
40namespace boost
41{
42namespace asio
43{
45} // namespace asio
46} // namespace boost
47#endif
48
49#endif