|
Boost : |
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2008-08-18 05:50:22
> Picking up on one of Dave's comments,
> do you put a test in every function that takes a
> pointer to test whether you have been passed a null?
If the pointer would be guaranteed to be nonzero, I would prefer to use
a reference (in the function signature) instead of a pointer. I admit
that it's not always possible to use references, because pointer
arithmetic is not applicable to references. But in this case, an
iterator would be more suitable than a pointer.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk