1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
4 | <title>History & Compatibility Notes</title> |
---|
5 | <link rel="stylesheet" href="../boostbook.css" type="text/css"> |
---|
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
---|
7 | <link rel="start" href="../index.html" title="The Boost C++ Libraries"> |
---|
8 | <link rel="up" href="../function.html" title="Chapter 4. Boost.Function"> |
---|
9 | <link rel="prev" href="../function.html" title="Chapter 4. Boost.Function"> |
---|
10 | <link rel="next" href="tutorial.html" title="Tutorial"> |
---|
11 | </head> |
---|
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
---|
13 | <table cellpadding="2" width="100%"> |
---|
14 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td> |
---|
15 | <td align="center"><a href="../../../index.htm">Home</a></td> |
---|
16 | <td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td> |
---|
17 | <td align="center"><a href="../../../people/people.htm">People</a></td> |
---|
18 | <td align="center"><a href="../../../more/faq.htm">FAQ</a></td> |
---|
19 | <td align="center"><a href="../../../more/index.htm">More</a></td> |
---|
20 | </table> |
---|
21 | <hr> |
---|
22 | <div class="spirit-nav"> |
---|
23 | <a accesskey="p" href="../function.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../function.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../images/next.png" alt="Next"></a> |
---|
24 | </div> |
---|
25 | <div class="section" lang="en"> |
---|
26 | <div class="titlepage"><div><div><h3 class="title"> |
---|
27 | <a name="function.history"></a>History & Compatibility Notes</h3></div></div></div> |
---|
28 | <div class="itemizedlist"><ul type="disc" compact> |
---|
29 | <li> |
---|
30 | <p><span class="bold"><strong>Version 1.30.0</strong></span>: </p> |
---|
31 | <div class="itemizedlist"><ul type="circle" compact> |
---|
32 | <li><p>All features deprecated in version 1.29.0 have |
---|
33 | been removed from Boost.Function.</p></li> |
---|
34 | <li><p><code class="computeroutput"><a href="../boost/function.html" title="Class template function">boost::function</a></code> |
---|
35 | and <code class="computeroutput"><a href="../functionN.html" title="Class template functionN">boost::functionN</a></code> objects |
---|
36 | can be assigned to 0 (semantically equivalent to calling |
---|
37 | <code class="computeroutput"><a href="../boost/function.html#id2434373-bb">clear</a>()</code>) and |
---|
38 | compared against 0 (semantically equivalent to calling |
---|
39 | <code class="computeroutput"><a href="../boost/function.html#id2396343-bb">empty</a>()</code>).</p></li> |
---|
40 | <li><p>The Boost.Function code is now generated |
---|
41 | entirely by the <a href="../../../libs/preprocessor/index.html" target="_top">Preprocessor</a> library, |
---|
42 | so it is now possible to generate |
---|
43 | <code class="computeroutput"><a href="../boost/function.html" title="Class template function">boost::function</a></code> and |
---|
44 | <code class="computeroutput"><a href="../functionN.html" title="Class template functionN">boost::functionN</a></code> class |
---|
45 | templates for any number of arguments.</p></li> |
---|
46 | <li><p>The |
---|
47 | <code class="computeroutput"><a href="../bad_function_call.html" title="Class bad_function_call">boost::bad_function_call</a></code> exception class |
---|
48 | was introduced.</p></li> |
---|
49 | </ul></div> |
---|
50 | </li> |
---|
51 | <li> |
---|
52 | <p><span class="bold"><strong>Version 1.29.0</strong></span>: |
---|
53 | Boost.Function has been partially redesigned to minimize the |
---|
54 | interface and make it cleaner. Several seldom- or never-used |
---|
55 | features of the older Boost.Function have been deprecated and will |
---|
56 | be removed in the near future. Here is a list of features that have |
---|
57 | been deprecated, the likely impact of the deprecations, and how to |
---|
58 | adjust your code: |
---|
59 | |
---|
60 | </p> |
---|
61 | <div class="itemizedlist"><ul type="circle" compact> |
---|
62 | <li> |
---|
63 | <p>The <code class="computeroutput">boost::function</code> class template syntax has |
---|
64 | changed. The old syntax, e.g., <code class="computeroutput">boost::function<int, float, |
---|
65 | double, std::string></code>, has been changed to a more natural |
---|
66 | syntax <code class="computeroutput">boost::function<int (float, double, |
---|
67 | std::string)></code>, where all return and argument types are |
---|
68 | encoded in a single function type parameter. Any other template |
---|
69 | parameters (e.g., the <code class="computeroutput">Allocator</code>) follow this single |
---|
70 | parameter.</p> |
---|
71 | <p> The resolution to this change depends on the |
---|
72 | abilities of your compiler: if your compiler supports template |
---|
73 | partial specialization and can parse function types (most do), modify |
---|
74 | your code to use the newer |
---|
75 | syntax (preferable) or directly use one of the |
---|
76 | <code class="computeroutput">functionN</code> classes whose syntax has not |
---|
77 | changed. If your compiler does not support template partial |
---|
78 | specialization or function types, you must take the latter option and |
---|
79 | use the numbered Boost.Function classes. This option merely requires |
---|
80 | changing types such as <code class="computeroutput">boost::function<void, int, int></code> |
---|
81 | to <code class="computeroutput">boost::function2<void, int, int></code> (adding the number of |
---|
82 | function arguments to the end of the class name).</p> |
---|
83 | <p> Support for the old syntax with the |
---|
84 | <code class="computeroutput">boost::function</code> class template will persist for a short |
---|
85 | while, but will eventually be removed so that we can provide better |
---|
86 | error messages and link compatibility. </p> |
---|
87 | </li> |
---|
88 | <li><p>The invocation |
---|
89 | policy template parameter (<code class="computeroutput">Policy</code>) has been deprecated |
---|
90 | and will be removed. There is no direct equivalent to this rarely |
---|
91 | used feature.</p></li> |
---|
92 | <li><p>The mixin template parameter |
---|
93 | (<code class="computeroutput">Mixin</code>) has been deprecated and will be removed. There |
---|
94 | is not direct equivalent to this rarely used feature.</p></li> |
---|
95 | <li><p>The |
---|
96 | <code class="computeroutput">set</code> methods have been deprecated and will be |
---|
97 | removed. Use the assignment operator instead.</p></li> |
---|
98 | </ul></div> |
---|
99 | </li> |
---|
100 | </ul></div> |
---|
101 | </div> |
---|
102 | <table width="100%"><tr> |
---|
103 | <td align="left"><small><p>Last revised: January 23, 2005 at 16:23:09 GMT</p></small></td> |
---|
104 | <td align="right"><small>Copyright © 2001-2004 Douglas Gregor</small></td> |
---|
105 | </tr></table> |
---|
106 | <hr> |
---|
107 | <div class="spirit-nav"> |
---|
108 | <a accesskey="p" href="../function.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../function.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../images/next.png" alt="Next"></a> |
---|
109 | </div> |
---|
110 | </body> |
---|
111 | </html> |
---|