Boost logo

Boost :

From: Ronald Garcia (rgarcia4_at_[hidden])
Date: 2000-12-26 16:14:11

>>>>> "MC" == Marshall Clow <marshall_at_[hidden]> writes:

    MC> Sounds like a perfect place to use the "pImpl" idiom.

    MC> class SocketImpl;

    MC> class tcpipbuf ...... {

    MC> private: scoped_ptr<SocketImpl> socketData_; };

    MC> And then define the SocketImpl in your source file (a
    MC> different one for each implementation) -- -- Marshall

Can you declare a scoped_ptr without the parameter class definition
being visible? I have tried this before with std::auto_ptr and gotten
compiler errors because "delete SocketImpl" couldn't be defined at
compile time. I end up using a plain pointer and handling new and
delete by hand.


Boost list run by bdawes at, gregod at, cpdaniel at, john at