/Src/Dependencies/Boost/libs/function/doc/history.xml

http://hadesmem.googlecode.com/ · XML · 137 lines · 112 code · 18 blank · 7 comment · 0 complexity · cccba8968b9e12d91ac70d8a8202fb3b MD5 · raw file

  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: 2008-10-17 00:21:50 +1100 (Fri, 17 Oct 2008) $">
  11. <title>History &amp; Compatibility Notes</title>
  12. <itemizedlist spacing="compact">
  13. <listitem><para><bold>Version 1.37.0</bold>: </para>
  14. <itemizedlist spacing="compact">
  15. <listitem><para>Improved the performance of Boost.Function's
  16. swap() operation for large function objects. Original patch
  17. contributed by Niels Dekker.</para></listitem>
  18. <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>
  19. <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>
  20. <listitem><para>The <methodname alt="boost::function::target">target</methodname>()
  21. function now respects the cv-qualifiers of function objects
  22. stored by reference
  23. (using <classname>boost::reference_wrapper</classname>), such
  24. that a reference to a <code>const</code> function object cannot
  25. be accessed as a reference to a non-<code>const</code> function
  26. object.</para></listitem>
  27. </itemizedlist>
  28. </listitem>
  29. <listitem><para><bold>Version 1.36.0</bold>: </para>
  30. <itemizedlist spacing="compact">
  31. <listitem><para>Boost.Function now implements allocator support
  32. in the same way that is is provided in C++0x, based on C++
  33. committee
  34. proposal <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2308.html">N2308</ulink>. This
  35. change removes the <computeroutput>Allocator</computeroutput>
  36. template parameter of <classname>boost::function</classname> in
  37. favor of a constructor that takes an argument. While this is a
  38. backward-incompatible change, it is likely to affect only a few
  39. users. This change to Function was contributed by Emil
  40. Dotchevski, which also authored the corresponding C++ committee
  41. proposal.</para></listitem>
  42. </itemizedlist>
  43. </listitem>
  44. <listitem><para><bold>Version 1.34.0</bold>: </para>
  45. <itemizedlist spacing="compact">
  46. <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>
  47. </itemizedlist>
  48. </listitem>
  49. <listitem><para><bold>Version 1.30.0</bold>: </para>
  50. <itemizedlist spacing="compact">
  51. <listitem><para>All features deprecated in version 1.29.0 have
  52. been removed from Boost.Function.</para></listitem>
  53. <listitem><para><code><classname>boost::function</classname></code>
  54. and <code><classname>boost::functionN</classname></code> objects
  55. can be assigned to 0 (semantically equivalent to calling
  56. <code><methodname
  57. alt="boost::function::clear">clear</methodname>()</code>) and
  58. compared against 0 (semantically equivalent to calling
  59. <code><methodname
  60. alt="boost::function::empty">empty</methodname>()</code>).</para></listitem>
  61. <listitem><para>The Boost.Function code is now generated
  62. entirely by the <libraryname>Preprocessor</libraryname> library,
  63. so it is now possible to generate
  64. <code><classname>boost::function</classname></code> and
  65. <code><classname>boost::functionN</classname></code> class
  66. templates for any number of arguments.</para></listitem>
  67. <listitem><para>The
  68. <classname>boost::bad_function_call</classname> exception class
  69. was introduced.</para></listitem>
  70. </itemizedlist>
  71. </listitem>
  72. <listitem><para><bold>Version 1.29.0</bold>:
  73. Boost.Function has been partially redesigned to minimize the
  74. interface and make it cleaner. Several seldom- or never-used
  75. features of the older Boost.Function have been deprecated and will
  76. be removed in the near future. Here is a list of features that have
  77. been deprecated, the likely impact of the deprecations, and how to
  78. adjust your code:
  79. <itemizedlist spacing="compact">
  80. <listitem><para>The <computeroutput>boost::function</computeroutput> class template syntax has
  81. changed. The old syntax, e.g., <computeroutput>boost::function&lt;int, float,
  82. double, std::string&gt;</computeroutput>, has been changed to a more natural
  83. syntax <computeroutput>boost::function&lt;int (float, double,
  84. std::string)&gt;</computeroutput>, where all return and argument types are
  85. encoded in a single function type parameter. Any other template
  86. parameters (e.g., the <computeroutput>Allocator</computeroutput>) follow this single
  87. parameter.</para>
  88. <para> The resolution to this change depends on the
  89. abilities of your compiler: if your compiler supports template
  90. partial specialization and can parse function types (most do), modify
  91. your code to use the newer
  92. syntax (preferable) or directly use one of the
  93. <computeroutput>functionN</computeroutput> classes whose syntax has not
  94. changed. If your compiler does not support template partial
  95. specialization or function types, you must take the latter option and
  96. use the numbered Boost.Function classes. This option merely requires
  97. changing types such as <computeroutput>boost::function&lt;void, int, int&gt;</computeroutput>
  98. to <computeroutput>boost::function2&lt;void, int, int&gt;</computeroutput> (adding the number of
  99. function arguments to the end of the class name).</para>
  100. <para> Support for the old syntax with the
  101. <computeroutput>boost::function</computeroutput> class template will persist for a short
  102. while, but will eventually be removed so that we can provide better
  103. error messages and link compatibility. </para></listitem>
  104. <listitem><para>The invocation
  105. policy template parameter (<computeroutput>Policy</computeroutput>) has been deprecated
  106. and will be removed. There is no direct equivalent to this rarely
  107. used feature.</para></listitem>
  108. <listitem><para>The mixin template parameter
  109. (<computeroutput>Mixin</computeroutput>) has been deprecated and will be removed. There
  110. is not direct equivalent to this rarely used feature.</para></listitem>
  111. <listitem><para>The
  112. <computeroutput>set</computeroutput> methods have been deprecated and will be
  113. removed. Use the assignment operator instead.</para></listitem>
  114. </itemizedlist>
  115. </para>
  116. </listitem>
  117. </itemizedlist>
  118. </section>