Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2000-12-02 11:37:31

On Sat, 2 Dec 2000 09:32:02 +0000
Kevlin Henney <kevlin_at_[hidden]> wrote:

> In message <20001201193344.3e206c74.gregod_at_[hidden]>, Douglas Gregor
> <gregod_at_[hidden]> writes
> >My preference would be function_ptr if the callbacks have
> >reference semantics, or function_obj if they have cloning semantics ("functor"
> >would be my first choice for cloning semantics because it is concise, but it
> >appears that it is no longer a usable term).
> How about function_adapter?

This is a good name. My first inclination is to consider the callback as a thin wrapper around the function object, but indeed they are adapters because of the argument/return type conversions that can occur. My preference would be for either functor_adaptor for function_obj_adapter in any case, otherwise it may appear that function_adapter is less general than it really is.

However, I think the adaptation is implicit in the name function_obj, because users are already accustomed to overloading and would expect a generalized function_obj to support overloading in some way.

        Doug Gregor

Boost list run by bdawes at, gregod at, cpdaniel at, john at