history.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. -->
  8. <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
  9. "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
  10. <section id="function.history" last-revision="$Date$">
  11. <title>History &amp; Compatibility Notes</title>
  12. <itemizedlist spacing="compact">
  13. <listitem><para><bold>Version 1.52.0</bold>: </para>
  14. <itemizedlist spacing="compact">
  15. <listitem><para>Move constructors and move assignment
  16. operators added (only for compilers with C++11 rvalue
  17. references support). Original patch
  18. contributed by Antony Polukhin.</para></listitem>
  19. </itemizedlist>
  20. </listitem>
  21. <listitem><para><bold>Version 1.37.0</bold>: </para>
  22. <itemizedlist spacing="compact">
  23. <listitem><para>Improved the performance of Boost.Function's
  24. swap() operation for large function objects. Original patch
  25. contributed by Niels Dekker.</para></listitem>
  26. <listitem><para>Added a new header &lt;boost/function/function_typeof.hpp&gt; that provides support for using the Boost.Typeof library on Boost.Function objects.</para></listitem>
  27. <listitem><para>Added a new header &lt;boost/function/function_fwd.hpp&gt; that provides support for using the Boost.Typeof library on Boost.Function objects.</para></listitem>
  28. <listitem><para>The <methodname alt="boost::function::target">target</methodname>()
  29. function now respects the cv-qualifiers of function objects
  30. stored by reference
  31. (using <classname>boost::reference_wrapper</classname>), such
  32. that a reference to a <code>const</code> function object cannot
  33. be accessed as a reference to a non-<code>const</code> function
  34. object.</para></listitem>
  35. </itemizedlist>
  36. </listitem>
  37. <listitem><para><bold>Version 1.36.0</bold>: </para>
  38. <itemizedlist spacing="compact">
  39. <listitem><para>Boost.Function now implements allocator support
  40. in the same way that is is provided in C++0x, based on C++
  41. committee
  42. proposal <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2308.html">N2308</ulink>. This
  43. change removes the <computeroutput>Allocator</computeroutput>
  44. template parameter of <classname>boost::function</classname> in
  45. favor of a constructor that takes an argument. While this is a
  46. backward-incompatible change, it is likely to affect only a few
  47. users. This change to Function was contributed by Emil
  48. Dotchevski, which also authored the corresponding C++ committee
  49. proposal.</para></listitem>
  50. </itemizedlist>
  51. </listitem>
  52. <listitem><para><bold>Version 1.34.0</bold>: </para>
  53. <itemizedlist spacing="compact">
  54. <listitem><para>Boost.Function now implements a small buffer optimization, which can drastically improve the performance when copying or construction Boost.Function objects storing small function objects. For instance, <code>bind(&amp;X:foo, &amp;x, _1, _2)</code> requires no heap allocation when placed into a Boost.Function object. Note that some exception-safety guarantees have changed: assignment provides the basic exception guarantee and <code>swap()</code> may throw.</para></listitem>
  55. </itemizedlist>
  56. </listitem>
  57. <listitem><para><bold>Version 1.30.0</bold>: </para>
  58. <itemizedlist spacing="compact">
  59. <listitem><para>All features deprecated in version 1.29.0 have
  60. been removed from Boost.Function.</para></listitem>
  61. <listitem><para><code><classname>boost::function</classname></code>
  62. and <code><classname>boost::functionN</classname></code> objects
  63. can be assigned to 0 (semantically equivalent to calling
  64. <code><methodname
  65. alt="boost::function::clear">clear</methodname>()</code>) and
  66. compared against 0 (semantically equivalent to calling
  67. <code><methodname
  68. alt="boost::function::empty">empty</methodname>()</code>).</para></listitem>
  69. <listitem><para>The Boost.Function code is now generated
  70. entirely by the <libraryname>Preprocessor</libraryname> library,
  71. so it is now possible to generate
  72. <code><classname>boost::function</classname></code> and
  73. <code><classname>boost::functionN</classname></code> class
  74. templates for any number of arguments.</para></listitem>
  75. <listitem><para>The
  76. <classname>boost::bad_function_call</classname> exception class
  77. was introduced.</para></listitem>
  78. </itemizedlist>
  79. </listitem>
  80. <listitem><para><bold>Version 1.29.0</bold>:
  81. Boost.Function has been partially redesigned to minimize the
  82. interface and make it cleaner. Several seldom- or never-used
  83. features of the older Boost.Function have been deprecated and will
  84. be removed in the near future. Here is a list of features that have
  85. been deprecated, the likely impact of the deprecations, and how to
  86. adjust your code:
  87. <itemizedlist spacing="compact">
  88. <listitem><para>The <computeroutput>boost::function</computeroutput> class template syntax has
  89. changed. The old syntax, e.g., <computeroutput>boost::function&lt;int, float,
  90. double, std::string&gt;</computeroutput>, has been changed to a more natural
  91. syntax <computeroutput>boost::function&lt;int (float, double,
  92. std::string)&gt;</computeroutput>, where all return and argument types are
  93. encoded in a single function type parameter. Any other template
  94. parameters (e.g., the <computeroutput>Allocator</computeroutput>) follow this single
  95. parameter.</para>
  96. <para> The resolution to this change depends on the
  97. abilities of your compiler: if your compiler supports template
  98. partial specialization and can parse function types (most do), modify
  99. your code to use the newer
  100. syntax (preferable) or directly use one of the
  101. <computeroutput>functionN</computeroutput> classes whose syntax has not
  102. changed. If your compiler does not support template partial
  103. specialization or function types, you must take the latter option and
  104. use the numbered Boost.Function classes. This option merely requires
  105. changing types such as <computeroutput>boost::function&lt;void, int, int&gt;</computeroutput>
  106. to <computeroutput>boost::function2&lt;void, int, int&gt;</computeroutput> (adding the number of
  107. function arguments to the end of the class name).</para>
  108. <para> Support for the old syntax with the
  109. <computeroutput>boost::function</computeroutput> class template will persist for a short
  110. while, but will eventually be removed so that we can provide better
  111. error messages and link compatibility. </para></listitem>
  112. <listitem><para>The invocation
  113. policy template parameter (<computeroutput>Policy</computeroutput>) has been deprecated
  114. and will be removed. There is no direct equivalent to this rarely
  115. used feature.</para></listitem>
  116. <listitem><para>The mixin template parameter
  117. (<computeroutput>Mixin</computeroutput>) has been deprecated and will be removed. There
  118. is not direct equivalent to this rarely used feature.</para></listitem>
  119. <listitem><para>The
  120. <computeroutput>set</computeroutput> methods have been deprecated and will be
  121. removed. Use the assignment operator instead.</para></listitem>
  122. </itemizedlist>
  123. </para>
  124. </listitem>
  125. </itemizedlist>
  126. </section>