Skip to content

Compilation problem: ‘exchange’ is not a member of ‘std’ (in boost ASIO) #1

@gesior

Description

@gesior

If during compilation you get error like:

In file included from /usr/include/boost/asio.hpp:23,
                 from /home/proxy/alpha-proxy/server.h:4,
                 from /home/proxy/alpha-proxy/server.cpp:1:
/usr/include/boost/asio/awaitable.hpp: In constructor ‘boost::asio::awaitable<T, Executor>::awaitable(boost::asio::awaitable<T, Executor>&&)’:
/usr/include/boost/asio/awaitable.hpp:68:19: error: ‘exchange’ is not a member of ‘std’

In server.h above:

#include <boost/asio.hpp>

Add:

#include <utility>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions