Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-02-18 12:24:21


At 11:12 AM 2/18/2002, Jeremy Siek wrote:

>I'd like to see some form of named/keyword parameters for template
>parameters and perhaps also function parameters.

Agreed.

> The lack of this has made
>parts of the boost graph library very difficult to design and implement.
>
>As posted earlier, there's a difficulty in trying to shoehorn named
>parameters into the current framework, because parameters names currently
>don't mean anything, only position does. Take for example:
>
>template <typename A = char, typename B = int> class foo;
>...
>template <typename B = char, typename A = int> class foo;
>
>foo<B=int> // what does this mean?

Can't you just say "first seen?" as the answer to the question?

An implementation might also (as QOI) warn if additional declarations
rename or reorder the parameters.

--Beman


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