Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-08-06 16:01:12


Peter Dimov wrote:
> 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. :-)

Not here :). I intentionally didn't qualify 'scoped_ptr'; ours works just
fine :).

Aleksey


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