Hi Erik,

On Wed, Jan 20, 2010 at 21:43, Nelson, Erik - 2
<[email protected]> wrote:
> Hi there,
>
> I'm playing with the hello_world.cpp (current one in
> mikhailberis-cpp-netlib git) and have a couple of questions.  Here's the
> start of my compiler output
>
> 1>http_server.cpp
> 1>Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For
> example:
> 1>- add -D_WIN32_WINNT=0x0501 to the compiler command line; or
> 1>- add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions.
> 1>Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).
> 1>c:\work\boost\boost/network/protocol/http/traits/impl/request_methods.
> ipp(37) : error C2059: syntax error : 'constant'
>
>
> Comments/Questions:
> 1) I know that _WIN32_WINNT is #defined in the jamfile, but I'm curious
> if anyone knows why this warning comes up with cpp-netlib... We use
> boost extensively but have never needed to #define this
> 2) the error comes from
>   request_methods.ipp, on line
>   static char const * const DELETE = "DELETE";
> Winnt.h #defines DELETE.  If I change the offending line in
> request_methods.ipp to 'DELETE_', that seems to fix it
>
> After I fix that, the next error I get is:
> 1>c:\work\boost\boost/network/uri/http/detail/parse_specific.hpp(74) :
> error C2065: 'not' : undeclared identifier
>
> Adding #include <ciso646> to parse_specific.hpp gets it on the road, but
> then I come to something I don't see any obvious answer to:
>
> 1>c:\work\boost\boost/network/uri/http/uri.hpp(36) : error C2597:
> illegal reference to non-static member
> 'boost::network::uri::basic_uri<boost::network::tags::http_default_8bit_
> tcp_resolve>::string_type'
>
> It's complaining about this code
>
>            uint32_t port() const {
>                return parts_.port ? *(parts_.port) :
>                    (boost::iequals(parts_.scheme, string_type("https"))
> ? 443u : 80u);
>            }
>
>
> Am I doing something wrong?  Or is this known to be broken right now?
> I'm using a copy of Dean's code that I pulled down today.  Any guidance
> would be appreciated.
>
> Thanks
>
> Erik
>

I've written a patch which might fix the two URI related errors,
though I currently have no way of testing them as I have no Windows
install around, please give them a shot and let me know.

Yours,
Jeroen Habraken
diff --git a/boost/network/uri/http/detail/parse_specific.hpp b/boost/network/uri/http/detail/parse_specific.hpp
index ce51f08..93b4312 100644
--- a/boost/network/uri/http/detail/parse_specific.hpp
+++ b/boost/network/uri/http/detail/parse_specific.hpp
@@ -57,10 +57,10 @@ namespace boost { namespace network { namespace uri {
                 if (parts.scheme.size() < 4 or parts.scheme.size() > 5)
                     return false;
                 if (parts.scheme.size() == 4) {
-                    if (not boost::iequals(parts.scheme.substr(0, 4), "http"))
+                    if (! boost::iequals(parts.scheme.substr(0, 4), "http"))
                         return false;
                 } else {  // size is 5
-                    if (not boost::iequals(parts.scheme.substr(0, 5), "https"))
+                    if (! boost::iequals(parts.scheme.substr(0, 5), "https"))
                         return false;
                 }
                 
diff --git a/boost/network/uri/http/uri.hpp b/boost/network/uri/http/uri.hpp
index 22244b4..de71b9d 100644
--- a/boost/network/uri/http/uri.hpp
+++ b/boost/network/uri/http/uri.hpp
@@ -20,7 +20,7 @@ namespace boost { namespace network { namespace uri {
 
     template <>
         struct basic_uri<tags::http_default_8bit_tcp_resolve> : uri_base<tags::http_default_8bit_tcp_resolve> {
-            using uri_base<tags::http_default_8bit_tcp_resolve>::string_type;
+            typedef uri_base<tags::http_default_8bit_tcp_resolve>::string_type string_type;
             using uri_base<tags::http_default_8bit_tcp_resolve>::operator=;
             using uri_base<tags::http_default_8bit_tcp_resolve>::swap;
 
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Cpp-netlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel

Reply via email to