Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-01-29 22:35:58

I've just committed some changes to Boost.Function so that it will optimize
away unnecessary allocations and copying of stateless function objects. Thus,
construction of or assignment to a Boost.Function object given a stateless
function object will not throw, and will not allocate any memory.

To do this, a new type trait, is_stateless, has been added to
boost/type_traits/object_traits.hpp. The definition of is_stateless is:

template <typename T>
struct is_stateless

The functionality has been tested under GCC, Comeau, and MSVC without any
problems. Documentation may lag behind a bit, but I'm working on it.

Comments always welcome.


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