test/function_n_test.cpp:

test/function_test.cpp:
  - Don't use deprecated functions

index.html:
doc/reference.html:
  - Describe deprecations


[SVN r14540]
This commit is contained in:
Douglas Gregor
2002-07-19 20:45:36 +00:00
parent 3264064074
commit e9ce99dede
4 changed files with 46 additions and 44 deletions

View File

@ -13,6 +13,7 @@
<p> Generally, any place in which a function pointer would be used to defer a call or make a callback, Boost.Function can be used instead to allow the user greater flexibility in the implementation of the target. Targets can be any 'compatible' function object (or function pointer), meaning that the arguments to the interface designated by Boost.Function can be converted to the arguments of the target function object.
<ul>
<li><a href="#compatibility">Compatibility Note</a></li>
<li><a href="doc/tutorial.html">Tutorial</a></li>
<li><a href="doc/reference.html">Reference manual</a></li>
<li><a href="#vspointers">Boost.Function vs. Function Pointers</a></li>
@ -23,6 +24,17 @@
<li><a href="doc/faq.html">Frequently Asked Questions</a></li>
</ul>
<a name="compatibility"><h2>Compatibility Note</h2></a>
<p> Boost.Function has been partially redesigned to minimize the interface and make it cleaner. Several seldom- or never-used features of the older Boost.Function have been deprecated and will be removed in the near future. Here is a list of features that have been deprecated, the likely impact of the deprecations, and how to adjust your code:
<ul>
<li>The <code>boost::function</code> class template syntax has changed. The old syntax, e.g., <code>boost::function&lt;int, float, double, std::string&gt;</code>, has been changed to a more natural syntax <code>boost::function&lt;int (float, double, std::string)&gt;</code>, where all return and argument types are encoded in a single function type parameter. Any other template parameters (e.g., the <code>Allocator</code>) follow this single parameter.
<p> The resolution to this change depends on the abilities of your compiler: if your compiler supports template partial specialization (most do), modify your code to use the newer syntax (preferable) or directly use one of the <code>function<em>N</em></code> classes whose syntax has not changed. If your compiler does not support template partial specialization, you must take the latter option and use the numbered Boost.Function classes.
<p> Support for the old syntax with the <code>boost::function</code> class template will persist for a short while, but will eventually be removed so that we can provide better error messages and link compatibility. </li>
<li>The invocation policy template parameter (<code>Policy</code>) has been deprecated and will be removed. There is no direct equivalent to this rarely used feature.</li>
<li>The mixin template parameter (<code>Mixin</code>) has been deprecated and will be removed. There is not direct equivalent to this rarely used feature.</li>
<li>The <code>set</code> methods have been deprecated and will be removed. Use the assignment operator instead.</li>
</ul>
<h2><a name="vspointers">Boost.Function vs. Function Pointers</a></h2>
<p>Boost.Function has several advantages over function pointers, namely: