|
Boost : |
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2004-12-09 16:21:34
Rob Stewart wrote:
> From: "Yuval Ronen" <ronen_yuval_at_[hidden]>
>>> function invocation, and being shorter.
>>
>> I blieve this a matter of point of view. I think of it as
>> "extracting the inner object" within the any object, so get() sounds
>> more intuitive. I'd much rather writing something like:
>> int a = some_any.get<int>();
>
> But you can't. You have to write the following, as I showed
> above:
>
> int a = some_any.template get<int>();
>
>> You think of it as a cast so any_cast sounds better to you. My guess
>> that neither of us will be able to convince the other, so I'll
>> suggest some sort of compromise: why don't we have both?
>
> Do you still like your version?
>
> Yes, I think cast fits quite nicely, but I hate forcing the use
> of the "template" qualifier in function calls when I can avoid
> it.
I can just imagine the deluge of support emails asking why
some_any.get<int>() won't work!
Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk