Hi,
in a project we want to wrap the Boost Asio socket in a way, that the using class or the wrapping .h does not have to include the boost headers.
We usually use pointers and forward declarations for wrapped classes.
Foward declaration:
namespace boost
{
namespace asio
{
namespace ip
{
class udp;
}
}
}
And then declaring the socket:
scoped_ptr<boost::asio::ip::udp::socket> socket_;
scoped_ptr<boost::asio::ip::udp::endpoint> receiveEp_;
(If you don't know scoped_ptr, ignore it, the problem is equal with a standard * pointer.)
But this gives a compiler error:
error C2027: use of undefined type 'boost::asio::ip::udp'
I understand this is because udp is actually not a namespace, but a class itself. We only want to use the inner class though, any ideas?