Boost logo

Boost :

Subject: [boost] [asio] MSVC compiler error when compiling urdl
From: Christian Henning (chhenning_at_[hidden])
Date: 2015-08-25 17:57:05


So URDL (https://github.com/chriskohlhoff/urdl ) is not part of boost, I
know. But a nasty MSVC 2013 compiler error prevents the most simple code to
compile.

#define _WIN32_WINNT 0x0601
#define URDL_HEADER_ONLY 1
#define URDL_DISABLE_SSL 1

#include <urdl/istream.hpp>
#include <boost/progress.hpp>
#include <iostream>
#include <fstream>

int main(int argc, char* argv[])
{
return 0;
}

The fix is relatively simple but it would change code is asio's
handler_invoke_helpers.hpp. Basically change:

    using boost::asio::asio_handler_invoke;
    asio_handler_invoke(function, boost::asio::detail::addressof(context));

to

    boost::asio::asio_handler_invoke(function,
boost::asio::detail::addressof(context));

I'm using VC2013. I'm using master branch of boost.

Regards,
Christian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk