On Fri, Jan 30, 2004 at 01:54:37PM +0100, Lars Gullik Bjønnes wrote: > Andre Poenitz <[EMAIL PROTECTED]> writes: > > | This intention of this 'nucleus/operator->' pair instead of the usual > | 'nucleus/nucleus' pair was to be able to find the non-const accesses > | with grep. [They are sort of 'unwanted' in the light of potential > | shared_ptr usage and each use should be justified explicitly...] > > Not exacly documented in the sources... > > Ok... then operator-> should stay as it is and a operator* should be > added, so that the t.operator-> construct can be removed. > > But I don't really understand why non-const access is bad?
I wanted to set up some kind of reference counted implementation for MathAtoms at some point of time so I thought I'd better try to prevent non-const accesses. The point may be completely mood, though. First of all, that waste of memory does not have a visible impact on mathed performance as far as I can tell, and then, one of the (semi-)standard shared pointers might do better than any home grown solution I'd have come up with in the end. Andre'