【发布时间】:2014-07-26 08:06:40
【问题描述】:
我下载了 http 库 urdl,试图从 doc(http://think-async.com/Urdl/doc/html/urdl/getting_started/setting_options_to_perform_an_http_post.html) 编译示例:
#define URDL_HEADER_ONLY 1
#include <boost/array.hpp>
#include <urdl/http.hpp>
#include <urdl/istream.hpp>
int main() {
urdl::istream is;
is.set_option(urdl::http::request_method("POST"));
is.set_option(urdl::http::request_content_type("text/plain"));
is.set_option(urdl::http::request_content("Hello, world!"));
is.open("http://somehost/path");
}
编译错误:
g:\boost\boost/asio/detail/handler_invoke_helpers.hpp(37) : error C2666: 'urdl::
detail::asio_handler_invoke' : 3 overloads have similar conversions
g:\urdl\include\urdl/detail/http_read_stream.hpp(488): could be 'void ur
dl::detail::asio_handler_invoke<Function>(const Function &,urdl::detail::http_re
ad_stream<Stream>::read_handler<Handler> *)' [found using argument-dependent loo
kup]
with
[
....
环境是Win7+VS2010,知道吗?
谢谢。
【问题讨论】:
-
看来这个错误是从 boost 1.55 引入的
标签: c++ boost compiler-errors