C++ 如何设置标志(cpp netlib)

C++ 如何设置标志(cpp netlib),c++,boost,network-programming,cpp-netlib,C++,Boost,Network Programming,Cpp Netlib,我觉得我的问题真的很琐碎,但我还是无法让它发挥作用 std::string url="www.google.it"; boost::network::http::client client1_(_follow_redirects=true, _cache_resolved=true); boost::network::http::client::request req(url); boost::network::http::client::response resp = client1_.ge

我觉得我的问题真的很琐碎,但我还是无法让它发挥作用

std::string url="www.google.it";

boost::network::http::client client1_(_follow_redirects=true, _cache_resolved=true);
boost::network::http::client::request req(url);
boost::network::http::client::response resp = client1_.get(req);
std::cout << "Body: " << body(resp) << std::endl;

return 0;

从文档的这一页:

谢谢,实际上我正在看这里,刚刚意识到语法已从0.9…+1更改,再次感谢@维托里奥皮切拉不错。我不知道。有时,只有第二双眼睛起作用:) /home/snake91/cpp_pricing/underlying.cpp:67: error: C++ requires a type specifier for all declarations boost::network::http::client client1_(_follow_redirects=true, _cache_resolved=true);

                                      ^
client::options options;
options.follow_redirects(true)
       .cache_resolved(true);

client client1_(options);