Boost logo

Boost :

From: dan marsden (danmarsden_at_[hidden])
Date: 2008-01-06 07:34:19


Steven Watanabe wrote: >dan marsden <danmarsden <at> yahoo.co.uk> writes: >> The documentation is not specific about which specific type >> (e.g. mpl::int_<1> for case 1 matching in the >> underlying switch statement) is going to be used. >The type that is passed to f is whatever is in the list of cases. Ok cool. >> It looks to me like >> it would be convenient to overload >> operator() for each case I want to service, but this will be >> awkward to do without knowing the exact type >> that will be incoming. >> >> <snip> > >If multiple cases are not grouped together, I don't >see how it's an advantage to use my library vs. using a >plain old hand-written switch. Would you mind elaborating? I think you're probably right, my original suggestion that multiple overloads of operator() would be likely is probably wrong. I can only suggest handling special cases such as divide by zero for example, but I think my original suggestion may be a red herring. Cheers Dan ___________________________________________________________ Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/


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