Boost logo

Boost Users :

Subject: Re: [Boost-users] Compiler's telling me a Boost class isn't a class.
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-04-16 19:31:12


AMDG

G S wrote:
> Just started using Boost, and these three lines (which compile in another
> project) fail here:
>
> // Get a list of endpoints corresponding to the server name.
> tcp::resolver theResolver(boost::asio::io_service);
>

This is a function declaration.

> tcp::resolver::query query("10.10.10.10", "http");
> tcp::resolver::iterator endpoint_iterator = theResolver.resolve(query);
>
>
> The compiler gripes thus:
>
> error: request for member 'resolve' in 'theResolver', which is of non-class
> type 'boost::asio::ip::basic_resolver<boost::asio::ip::tcp,
> boost::asio::ip::resolver_service<boost::asio::ip::tcp> >
> ()(boost::asio::io_service)'
>
>
> "using boost::asio::ip::tcp;" appears in an earlier included file.
>
> I don't see why this would work elsewhere and not here. Anybody have a
> guess as to what the problem is? Thanks!
>

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net