Boost logo

Boost :

Subject: Re: [boost] [unordered] unordered_set::erase() complexity bug?
From: Jeffrey Bosboom (jbosboom_at_[hidden])
Date: 2009-11-25 15:54:54

Stefan Strasser wrote:
> this is just an idea off the top of my head, I haven't thought this through,
> but has the committee ever considered making functions overloadable by their
> return type?
> void f(); // 1
> int f(); // 2
> int main(){
> f(); //resolves to 1
> int b=f(); //resolves to 2
> }

That's a pretty drastic language change to solve an issue that is really
a library problem. (Besides, what if I want to call function 2 for its
side effects and ignore its return type? Even the ugly "(void)f()"
doesn't seem to do what I want.)

--Jeffrey Bosboom

Boost list run by bdawes at, gregod at, cpdaniel at, john at