<purpose><para>Test the capabilities of the <classname>boost::function</classname> class template.</para></purpose>
<if-fails><para>The <classname>boost::function</classname> class template may not be usable on your compiler. However, the library may still be usable via the <classname>boost::functionN</classname> class templates.</para></if-fails>
</run-test>
<run-testfilename="function_n_test.cpp">
<purpose><para>Test the capabilities of the <classname>boost::functionN</classname> class templates.</para></purpose>
</run-test>
<run-testfilename="allocator_test.cpp">
<purpose><para>Test the use of custom allocators.</para></purpose>
<if-fails><para>Allocators are ignored by the implementation.</para></if-fails>
</run-test>
<run-testfilename="stateless_test.cpp">
<purpose><para>Test the optimization of stateless function objects in the Boost.Function library.</para></purpose>
<if-fails><para>The exception-safety and performance guarantees given for stateless function objects may not be met by the implementation.</para></if-fails>
</run-test>
<run-testfilename="lambda_test.cpp">
<purpose><para>Test the interaction between Boost.Function and Boost.Lambda.</para></purpose>
<if-fails><para>Either Boost.Lambda does not work on the platform, or Boost.Function cannot safely be applied without the use of <functionname>boost::unlambda</functionname>.</para></if-fails>
<purpose><para>Test the use of an incompatible function object with Boost.Function</para></purpose>
<if-fails><para>Incorrect code may compile (with potentially unexpected results).</para></if-fails>
</compile-fail-test>
<compile-testfilename="function_30.cpp">
<purpose><para>Test the generation of a Boost.Function function object adaptor accepting 30 arguments.</para></purpose>
<if-fails><para>The Boost.Function library may work for function object adaptors of up to 10 parameters, but will be unable to generate adaptors for an arbitrary number of parameters. Failure often indicates an error in the compiler's preprocessor.</para></if-fails>
</compile-test>
<run-testfilename="function_arith_cxx98.cpp">
<source>
<![CDATA[
#include <boost/function.hpp>
#include <iostream>
]]>
<snippetname="function.tutorial.mul_ints"/>
<snippetname="function.tutorial.int_div"/>
int main()
{
<snippetname="function.tutorial.arith.cxx98"/>
<snippetname="function.tutorial.use_int_div"/>
<snippetname="function.tutorial.call_int_div"/>
<snippetname="function.tutorial.check_empty"/>
<snippetname="function.tutorial.clear"/>
<snippetname="function.tutorial.use_mul_ints"/>
return 0;
}
</source>
<purpose><para>Test the first tutorial example.</para></purpose>
</run-test>
<run-testfilename="function_arith_portable.cpp">
<source>
<![CDATA[
#include <boost/function.hpp>
#include <iostream>
]]>
<snippetname="function.tutorial.mul_ints"/>
<snippetname="function.tutorial.int_div"/>
int main()
{
<snippetname="function.tutorial.arith.portable"/>
<snippetname="function.tutorial.use_int_div"/>
<snippetname="function.tutorial.call_int_div"/>
<snippetname="function.tutorial.check_empty"/>
<snippetname="function.tutorial.clear"/>
<snippetname="function.tutorial.use_mul_ints"/>
return 0;
}
</source>
<purpose><para>Test the first tutorial example.</para></purpose>