Boost logo

Boost :

From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2006-02-05 10:40:12


David Abrahams wrote:
> Thorsten Ottosen <tottosen_at_[hidden]> writes:
>
>
>>>No, that's not the same thing at all. Read what I wrote again.
>>
>>ok, so we could return a tripple {begin,found,end}.
>
>
> I said quadruple. I meant {begin,found,found+1,end}.

why do you want to store found+1 when you can compute it on demand?

>>this means that
>>
>>1. we loose the benefit of a default
>
>
> The default might be a different function. In fact it would be in
> your case, too, since you can't deduce an explicit template argument
> from a default value.

there's a core issue that allows default function template arguments.
(not that we can make use of that today)

>>2. a slight overhead (the tripple construction cannot be optmized away)
>
>
> How do you know?
>
> The compiler can optimize anything it wants as long as it doesn't
> change the observable behavior.

Ok, cannot is the wrong word here. It still think it's unrealistic to
expect it though.

-Thorsten


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