Hello Erik,
On 24 February 2010 17:30, Nelson, Erik - 2 <eri...@ba...
> wrote:
> If I make a program like
>
>
> *******************************************
> #include "boost/network/protocol/http/client.hpp"
>
> typedef
> boost::network::http::basic_client<boost::network::tags::http_keepalive_
> 8bit_udp_resolve, 1, 1> http_client;
>
> void func()
> {
> http_client::request request;
> http_client client;
> client.get(request);
> }
>
> #include "boost/network/protocol/http/server.hpp"
> ********************************************
>
> I get a compile error that I've been unable to figure out that begins
>
> 1>C:\work\boost\boost/network/protocol/http/impl/sync_connection_base.hp
> p(318) : error C2059: syntax error : '<'
> 1>
> C:\work\boost\boost/network/protocol/http/policies/pooled_connection.hpp
> (36) : see reference to class template instantiation
> 'boost::network::http::impl::sync_connection_base<Tag,version_major,vers
> ion_minor>' being compiled
>
>
>
I can confirm that I get the same error using MSVC 8.0 with the following
code:
#include "boost/network/protocol/http/client.hpp"
#include "boost/network/protocol/http/server.hpp"
int
main(int argc, char *argv[]) {
typedef
boost::network::http::basic_client<boost::network::tags::http_keepalive_8bit_udp_resolve,
1, 1> http_client;
http_client client;
return 0;
}
You only pasted part of the compiler error message, the lines following this
are:
..\..\..\boost/network/protocol/http/policies/sync_resolver.hpp(25) : error
C2039: 'type' : is not a member of '`global namespace''
..\..\..\boost/network/protocol/http/policies/sync_resolver.hpp(25) : error
C2238: unexpected token(s) preceding ';'
..\..\..\boost/network/protocol/http/policies/sync_resolver.hpp(26) : error
C2065: 'string_type' : undeclared identifier
..\..\..\boost/network/protocol/http/policies/sync_resolver.hpp(32) : error
C2061: syntax error : identifier 'string_type'
..\..\..\boost/network/protocol/http/policies/pooled_connection.hpp(28) :
error C2059: syntax error : '<'
..\..\..\boost/network/protocol/http/policies/pooled_connection.hpp(28) :
error C2039: 'type' : is not a member of '`global namespace''
..\..\..\boost/network/protocol/http/policies/pooled_connection.hpp(28) :
error C2238: unexpected token(s) preceding ';'
..\..\..\boost/network/protocol/http/policies/pooled_connection.hpp(31) :
error C2059: syntax error : ','
etc.
and the code that appears to be failing is:
typedef typename string<Tag>::type string_type;
I managed to make this compile by changing this line to:
typedef typename boost::network::string<tag>::type string_type;
but clearly this is just masking the real error because it complains about
it not finding this type in the global namespace. My guess is an ADL error
but I don't have the time to go looking for this right now.
I have created an issue:
http://github.com/cpp-netlib/cpp-netlib/issues/issue/13
Thanks for spotting this,
Glyn
|