Boost logo

Boost :

From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2006-02-17 19:09:03


Jon Willesen wrote:
>>Jon Willesen wrote:
>>
>>>The only other thing I can think of that concerns me at all is if I'm trying
>>>to call a function that has been overloaded to take 1..N arguments using the
>>>preprocessor library or some other code generator. Then this code:
>>>
>>>func(list_of<string>(), "foo", "bar", "baz");
>>>
>>>might compile successfully and pass four arguments to func when I
>>>really meant
>>>to pass one argument:
>>>
>>>func((list_of<string>(), "foo", "bar", "baz"));
>
>
> Thorsten Ottosen wrote:
>
>>I think was the motivation. I had a user that called
>>a constructor:
>>
>>cons( list_of(3)(5), 4, 5 );
>>
>>he wanted to pass 3 arguments, but only one was passed.
>
>
> You got it backwards -- your example *does* pass three arguments.

Not before I removed operator,() from the class returned by list_of().

That was my point.

So pick your medicine: reintroduce it to satisfy your program and break
his or leave it as it is to break yours.

I think having that operator,() in the first release was a mistake.

-Thorsten


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