
22 Jul
2008
22 Jul
'08
3:20 p.m.
On Tue, Jul 22, 2008 at 07:30, Thorsten Ottosen <thorsten.ottosen@dezide.com> wrote:
Mathias Gaunard skrev:
As for forcing a pointer to not be empty, I suppose you're talking of making overloads of constructor and operator= for `int' and make them generate errors?
That seems like a nice idea that I will think about applying to Boost.PtrContainer.
I'm not convinced that this is useful. It doesn't protect against real nulls of pointer type, and if I see a failure talking about int when I want a null pointer, my first instinct would be to assume it's an overload or deduction error, and just cast it, at which point it will compile. YMMV, ~ Scott