where Boost.Function uses a bit in the vtable pointer to indicate when
the target function object has a trivial copy constructor, trivial
destructor, and fits within the small object buffer. In this case, we
just copy the bits of the function object rather than performing an
indirect call to the manager.
This results in a 60% speedup on a micro-benchmark that copies and
calls such function objects repeatedly.
[SVN r51743]
namespace, but function_base keys off the
BOOST_NO_EXCEPTION_STD_NAMESPACE macro instead of the
BOOST_NO_STD_TYPEINFO macro. The attached patch changes
function_base to use the typeinfo macro. Because eVC 4.2 doesn't
put typeinfo into the std namespace, I need to define
BOOST_NO_STD_TYPEINFO only for this eVC version.
[SVN r49571]
- Switch from dynamic initialization of the vtable pointer to static
initialization (Fixes#1260)
- Handle member pointers properly, only using mem_fn within the invoker
to deal with all of the messy bits of calling member pointers
[SVN r39240]
- Use a vtable instead of separate manager/invoker pointers, to shrink the
size of a boost::function object to 8 bytes
- Fix a problem with NULL member pointers
[SVN r32186]
- Work around a GCC <= 3.3 bug where the return type of a function template
that cannot possibly match is instantiated when it should not be, causing
errors in the use of operator==. This results in slightly reduced
functionality.
libs/function/test/contains_test.cpp:
- Don't test that which GCC cannot now handle
[SVN r23170]
- Comparison operators are now written in terms of function_base so that
implicit conversions to function<...> or functionN<...> don't allow
arbitrary comparisons.
[SVN r23126]
- Added "contains" member function to extract a pointer to the target
function object if you know its type
- Added operator== that can compare a Boost.Function object against a
function object
libs/function/test/Jamfile, libs/function/test/contains_test.cpp:
- Test contains() and equality comparison operators
[SVN r21844]