'const' again

From: Rutger van der Eijk (r36@nikhef.nl)
Date: Thu Sep 03 1998 - 18:41:23 MEST


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? 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:37 MET