On Wed, 09 May 2012 20:16:51 -0400, Mehrdad <[email protected]> wrote:

Is this possible/should it compile?

If not, should I make an enhancement request for it? It's been something that would've been useful in a ton of situations for me...

void process(R)(R items, size_t maxCount = items.length)
{
}

I *love* this idea.

Although, what happens if the expression for items is costly? We have to make sure if you do:

process(someExpensiveCalculation());

it doesn't turn into:

process(someExpensiveCalculation(), someExpensiveCalculation().length);

-Steve

Reply via email to