Boost logo

Boost :

From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2000-03-14 21:17:45


Hi,

> > Sorry, can't overload ?:, in fact overloading new, delete, -> and ->*
> don't
> > work either because they have a defined return type, which is not what
> you
> > want in this case.
>
> I meant a function, just as you have new_object (or whatever) as a standin
> for new, you have select(cond, a, b) as a standin for ?:.
ok, will do.

I got confused for while, first because I just knew I couldn't overload ?:
then when I got some self doubts and went standard searching I discovered
that I might be able to specialize operator?(bool a,T b ,T c) then I
realized I needed the expression stored in "a" and not the bool result, so
I'm back to making a function. But I did learn some dark corners of C++ on
the way. Thanks for the adventure.

-gary-


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