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 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost