Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-08-06 08:32:28


Aleksey Gurtovoy wrote:
>
> There is another variation of the idiom, sometimes called "hidden
> state", which doesn't have the shortcoming in the first place:
>
> class foo
> {
> public:
> foo();
> foo(int);
>
> int f() const;
> void g(double*);
>
> private:
> struct state;
> scoped_ptr<state> m_state;
> };

Missing ~foo, possible undefined behavior. :-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk