http version modifier doesn't compile for basic_response #182

kispaljr opened this Issue Jan 4, 2013 · 3 comments


None yet

2 participants

kispaljr commented Jan 4, 2013

The following code:

boost::network::http::basic_response<boost::network::http::tags::http_server> r;
r << boost::network::http::version(boost::network::http::traits::version<decltype(r)>::type ());

gives the following compilation error:

In file included from /home/isti/CPE/src/otherlib//cpp-netlib/boost/network/protocol/http/response.hpp:15:0,
                 from /home/isti/CPE/src/otherlib//cpp-netlib/boost/network/protocol/http/server.hpp:12,
                 from /home/isti/CPE/src/protos/http/HttpServer.h:3,
                 from /home/isti/CPE/src/protos/http/src/HttpServer.cpp:1:
/home/isti/CPE/src/otherlib//cpp-netlib/boost/network/protocol/http/message/directives/version.hpp: In instantiation of ‘typename boost::enable_if<boost::network::is_pod<Tag>, void>::type boost::network::http::version_directive<ValueType>::operator()(Message<Tag>&) const [with Tag = boost::network::http::tags::http_server; Message = boost::network::http::basic_response; ValueType = std::basic_string<char>; typename boost::enable_if<boost::network::is_pod<Tag>, void>::type = void]’:
/home/isti/CPE/src/otherlib//cpp-netlib/boost/network/protocol/http/response.hpp:95:9:   required from ‘boost::network::http::basic_response<Tag>& boost::network::http::operator<<(boost::network::http::basic_response<Tag>&, const Directive&) [with Tag = boost::network::http::tags::http_server; Directive = boost::network::http::version_directive<std::basic_string<char> >]’
/home/isti/CPE/src/protos/http/src/HttpServer.cpp:72:99:   required from here
/home/isti/CPE/src/otherlib//cpp-netlib/boost/network/protocol/http/message/directives/version.hpp:15:5: error: ‘struct boost::network::http::basic_response<boost::network::http::tags::http_server>’ has no member named ‘version’

cpp-netlib v0.9.4
Ubuntu 12.10 , gcc 4.7.2, boost 1.51

kispaljr commented Jan 7, 2013

Can somebody confirm that it is actually a bug in the library and not in my code? Because if it is in the library I will move on and try to fix it.


This looks to me like a deficiency in the library. Would appreciate a pull request to the 0.9-devel branch if you get around to fixing it. Sorry about the delayed response time.


I'm chalking this one up to a documentation bug, a duplicate to #265 -- if we're going to address this, we should reopen and have someone commit to fixing it in 0.9-devel.

@deanberris deanberris closed this Jul 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment