PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

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