From: Peter Dimov (pdimov_at_[hidden])
Date: 2000-11-29 12:52:58
From: "Kevlin Henney" <kevlin_at_[hidden]>
> Some, but certainly not the major part. Function objects fall into three
> categories wrt state:
> (1) Stateless, eg functions, many of the function object types in the
> standard, many predicates, many transformations.
> (2) Stateful but with fixed state, eg many bound function objects, many
> of the other function object types in the library, many predicates, many
> (3) Stateful but with changeable state, eg RNGs, accumulators.
3.1. per-instance state
3.2. per-class state
That's why function_ptr can't be 100% equivalent to a function pointer. A
function can never be in (3.1), but a function object might.
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk