Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 1999-12-29 12:02:57


>> Why the "T * const" in these declarations?
>>
>> explicit auto_action(T * const NPtr = 0,
>> const TFunctionObject & NFunctionObject = TFunctionObject())
>> void reset(T * const NPtr = 0)
>>
>> You should use "T *" instead.
>>
> No. The "const" tells the compiler (and user) that we do not modify "NPtr"
> in the constructor/reset method.

I was fooled because these pointer parameters are the only ones that appear
in your code. Presumably you would have declared any int parameters, for
example, as const int for the same reason.

    -- Darin


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk