|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-09-22 20:50:16
On Sunday 22 September 2002 01:45 pm, David Abrahams wrote:
> I've just been preparing class materials on Boost.Function, and it occurred
> to me that the use of the term "compatible" in the documentation could be
> confusing. On the one hand, it's used to describe which functions and
> function objects can be implicitly converted to function<T> objects (I like
> this one). On the other hand, it's used to describe the old syntax
> functionNN<result, arg1, arg2,... argNN> (I don't like this one). Could we
> try something else, like "portable" for the second usage?
When I picked over the Function documentation again for the proposal, I used
the term 'callable' for the first usage of compatible. A function object of
type F can be implicitly converted to a function<R (T1, T2, ..., TN)> object
if F is Callable with argument types T1, T2, ...., TN and return type R. I
think this is more clear than 'compatible' (and the concept is reusable as a
superior of UnaryFunction/BinaryFunction/etc).
I don't particularly like 'portable' for the second usage, because it makes
the preferred syntax sound like it isn't C++. But I'll use it if it helps
avoid confusion.
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk