Angus Leeming <[EMAIL PROTECTED]> writes: | On Friday 06 September 2002 1:43 pm, Lars Gullik Bjønnes wrote: | | > | | A minor point. Shouldn't this be | > | | + boost::shared_ptr<Counters> const ctrs_; | > | | | > | | showing future maintainers that you're using the shared_ptr only to | > | | avoid including counter.h in lyxtextclass.h. | > | | > | Perhaps... but how does adding const show that? (really) | > | > Adding cost gives this error: | > | > /usr/include/g++-3/stl_vector.h: In method `LyXTextClass | > &LyXTextClass::operator= (const LyXTextClass &)': | > /usr/include/g++-3/stl_vector.h:595: instantiated from `vector<_Tp, | > _Alloc>::_M_insert_aux (_Tp *, const _Tp &) [with _Tp = LyXTextClass, | > _Alloc = allocator<LyXTextClass>]' /usr/include/g++-3/stl_vector.h:325: | > instantiated from `vector<_Tp, _Alloc>::push_back (const _Tp &) [with _Tp = | > LyXTextClass, _Alloc = allocator<LyXTextClass>]' | > ../../src/lyxtextclasslist.C:139: instantiated from here | > /usr/include/g++-3/stl_vector.h:595: non-static const member `const | > boost::shared_ptr<Counters> LyXTextClass::ctrs_', can't use default | > assignment operator | | Ahhhhhhh. Fair point. Ignore my previous mail. | | Although why can't you use scoped_ptr?
scoped_ptr is not copyable. | Is shared_ptr really what you want in | this case? yes, I belive so. | If so, then a comment that this is a singleton instance wouldn't | go amiss... well... it is not really a singleton either... It is just a member variable. -- Lgb