'const' again

Rutger van der Eijk (r36@nikhef.nl)
Thu, 3 Sep 1998 18:41:23 +0200 (MET DST)


Hi,

Again a message about 'const' etc.

I somewhere need to stream a 'const Text_t*' into a TMessage, which is a
TBuffer.

I have

const Text_t* name = <something>
TMessage messOut(kMESS_OBJECT);

and would like to do:

messOut << name;

This doesn't work because the operator is defined as

TBuffer &TBuffer::operator<<(Char_t *c)

I think this should be:

TBuffer &TBuffer::operator<<(const Char_t *c

as for all the other TBuffer input (i.e. <<) operators. Or is there
(another) reason why I should not use the << operators? (Should I use the
WriteArray member?... ifso why are << operators public?)

Thanks,

Rutger

p.s. I'm curious to things discussed at CHEP98, will there be some
note/report/summary?