From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-02-06 20:04:41
At 07:33 PM 2/6/2002, mfdylan wrote:
>--- In boost_at_y..., "Andrei Alexandrescu" <andrewalex_at_h...> wrote:
>> I agree that a nicer default template argument mechanism (such as an
>> exclamation mark meaning, "use the default here") would make things
>> but by and large, I don't consider this to be a problem.
>Why exclamation mark? Surely just omitting it entirely would be
>Is there any reason that would cause a parsing problem?
>Personally I'd like to see this extended to function calls too.
One solution being discussed (used by many languages) is named parameters:
my_vector<int, checking_policy=range_checking> v;
It works particularly well when you want to supply a non-default only for
the last of a long list of arguments.
There is an open question as to whether it is acceptable to simulate
named-parameters using template techniques, or they should be built into
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk