|
Boost : |
From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2005-01-21 12:55:46
Jason Hise wrote:
>> void f(int);
>> void f(string *);
>> f(0); // which function is called?
> Doesn't this call f ( int )?
Yes.
> What is the problem here?
The point of the article still holds, I think. You have your NULL class.
Does it help here? Don't think so...
void f(string *);
void f(foo *);
f(NULL);
The problem doesn't lie with NULL itself; it lies with the poor design of
overloading these functions.
I've probably made a hash of describing the article. I'll butt out now.
Angus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk