
David Abrahams wrote:
Thorsten Ottosen <tottosen@dezide.com> 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