blob: f074211f11b31f458cd6e1c190cc641ce956c1d5 [file] [log] [blame]
Brian Silvermanaf2eaa82018-08-04 17:28:31 -07001<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4<title>Release Notes</title>
5<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7<link rel="home" href="../index.html" title="Boost.Optional">
8<link rel="up" href="../index.html" title="Boost.Optional">
9<link rel="prev" href="dependencies_and_portability/optional_reference_binding.html" title="Optional Reference Binding">
10<link rel="next" href="acknowledgements.html" title="Acknowledgements">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="dependencies_and_portability/optional_reference_binding.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h2 class="title" style="clear: both">
27<a name="boost_optional.relnotes"></a><a class="link" href="relnotes.html" title="Release Notes">Release Notes</a>
28</h2></div></div></div>
29<h4>
30<a name="boost_optional.relnotes.h0"></a>
31 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_68"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_68">Boost
32 Release 1.68</a>
33 </h4>
34<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
35<li class="listitem">
36 Added member function <code class="computeroutput"><span class="identifier">has_value</span><span class="special">()</span></code> for compatibility with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">optional</span></code> (<a href="https://github.com/boostorg/optional/issues/52" target="_top">issue
37 #52</a>).
38 </li>
39<li class="listitem">
40 Added member function <code class="computeroutput"><span class="identifier">map</span><span class="special">()</span></code> for transforming <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> into <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span></code> using a function of type <code class="computeroutput"><span class="identifier">T</span> <span class="special">-&gt;</span> <span class="identifier">U</span></code>.
41 </li>
42<li class="listitem">
43 Added member function <code class="computeroutput"><span class="identifier">flat_map</span><span class="special">()</span></code> for transforming <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> into <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span></code> using a function of type <code class="computeroutput"><span class="identifier">T</span> <span class="special">-&gt;</span> <span class="identifier">optonal</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span></code>.
44 </li>
45</ul></div>
46<h4>
47<a name="boost_optional.relnotes.h1"></a>
48 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_67"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_67">Boost
49 Release 1.67</a>
50 </h4>
51<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
52<li class="listitem">
53 Fixed <a href="https://github.com/boostorg/optional/issues/46" target="_top">issue
54 #46</a>.
55 </li>
56<li class="listitem">
57 Fixed <code class="computeroutput"><span class="special">-</span><span class="identifier">Wzero</span><span class="special">-</span><span class="identifier">as</span><span class="special">-</span><span class="identifier">null</span><span class="special">-</span><span class="identifier">pointer</span><span class="special">-</span><span class="identifier">constant</span></code> warnings.
58 </li>
59</ul></div>
60<h4>
61<a name="boost_optional.relnotes.h2"></a>
62 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_66"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_66">Boost
63 Release 1.66</a>
64 </h4>
65<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
66<li class="listitem">
67 On newer compilers <code class="computeroutput"><span class="identifier">optional</span></code>
68 is now trivially-copyable for scalar <code class="computeroutput"><span class="identifier">T</span></code>s.
69 This uses a different storage (just <code class="computeroutput"><span class="identifier">T</span></code>
70 rather than <code class="computeroutput"><span class="identifier">aligned_storage</span></code>).
71 We require the compiler to support defaulted functions.
72 </li>
73<li class="listitem">
74 Changed the implementation of <code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code> to get rid of the <code class="computeroutput"><span class="special">-</span><span class="identifier">Wmaybe</span><span class="special">-</span><span class="identifier">uninitialized</span></code> false-positive warning
75 from GCC.
76 </li>
77</ul></div>
78<h4>
79<a name="boost_optional.relnotes.h3"></a>
80 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_63"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_63">Boost
81 Release 1.63</a>
82 </h4>
83<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
84<li class="listitem">
85 Added two new in-place constructors. They work similarly to <code class="computeroutput"><span class="identifier">emplace</span><span class="special">()</span></code>
86 functions: they initialize the contained value by perfect-forwarding the
87 obtained arguments. One constructor always initializes the contained value,
88 the other based on a boolean condition.
89 </li>
90<li class="listitem">
91 Syntax <code class="computeroutput"><span class="identifier">o</span> <span class="special">=</span>
92 <span class="special">{}</span></code> now correctly un-initializes
93 optional, just like in <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">optional</span></code>.
94 </li>
95<li class="listitem">
96 Fixed <a href="https://svn.boost.org/trac/boost/ticket/12203" target="_top">Trac #12203</a>.
97 </li>
98<li class="listitem">
99 Fixed <a href="https://svn.boost.org/trac/boost/ticket/12563" target="_top">Trac #12563</a>.
100 </li>
101</ul></div>
102<h4>
103<a name="boost_optional.relnotes.h4"></a>
104 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_62"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_62">Boost
105 Release 1.62</a>
106 </h4>
107<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
108 Fixed <a href="https://svn.boost.org/trac/boost/ticket/12179" target="_top">Trac #12179</a>.
109 </li></ul></div>
110<h4>
111<a name="boost_optional.relnotes.h5"></a>
112 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_61"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_61">Boost
113 Release 1.61</a>
114 </h4>
115<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
116<li class="listitem">
117 Now <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span></code> is specialized for reference
118 parameters. This addresses a couple of issues:
119 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
120<li class="listitem">
121 the <code class="computeroutput"><span class="keyword">sizeof</span></code> of optional
122 reference is that of a pointer,
123 </li>
124<li class="listitem">
125 some bugs connected to copying optional references are gone,
126 </li>
127<li class="listitem">
128 all run-time bugs caused by incorrect reference binding on some compilers
129 are now turned into compile-time errors,
130 </li>
131<li class="listitem">
132 you can swap optional references: it is like swapping pointers: shalow,
133 underlying objects are not affected,
134 </li>
135<li class="listitem">
136 optional references to abstract types work.
137 </li>
138</ul></div>
139 </li>
140<li class="listitem">
141 Documented nested typedefs (<a href="https://svn.boost.org/trac/boost/ticket/5193" target="_top">Trac
142 #5193</a>).
143 </li>
144<li class="listitem">
145 Made the perfect-forwarding constructor SFINAE-friendly, which fixes <a href="https://svn.boost.org/trac/boost/ticket/12002" target="_top">Trac #12002</a>.
146 However, this only works in the newer platforms that correctly implement
147 C++11 <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">type_traits</span><span class="special">&gt;</span></code>.
148 </li>
149<li class="listitem">
150 Fixed <a href="https://svn.boost.org/trac/boost/ticket/10445" target="_top">Trac #10445</a>.
151 </li>
152</ul></div>
153<h4>
154<a name="boost_optional.relnotes.h6"></a>
155 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_60"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_60">Boost
156 Release 1.60</a>
157 </h4>
158<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
159 Changed the implementation of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">none</span></code>
160 again. Now it is a const object with internal linkage (as any other tag).
161 This fixes <a href="https://svn.boost.org/trac/boost/ticket/11203" target="_top">Trac
162 #11203</a>.
163 </li></ul></div>
164<h4>
165<a name="boost_optional.relnotes.h7"></a>
166 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_59"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_59">Boost
167 Release 1.59</a>
168 </h4>
169<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
170<li class="listitem">
171 For C++03 compilers, added 0-argument overload for member function <code class="computeroutput"><span class="identifier">emplace</span><span class="special">()</span></code>,
172 and therewith removed the dependency on <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">utility</span><span class="special">/</span><span class="identifier">in_place_factory</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>.
173 </li>
174<li class="listitem">
175 Fixed <a href="https://svn.boost.org/trac/boost/ticket/11241" target="_top">Trac #11241</a>.
176 </li>
177</ul></div>
178<h4>
179<a name="boost_optional.relnotes.h8"></a>
180 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_58"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_58">Boost
181 Release 1.58</a>
182 </h4>
183<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
184<li class="listitem">
185 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">none_t</span></code> is no longer convertible from
186 literal <code class="computeroutput"><span class="number">0</span></code>. This avoids a bug
187 where <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">rational</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;&gt;</span> <span class="identifier">oi</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span></code> would
188 initialize an optional object with no contained value.
189 </li>
190<li class="listitem">
191 Improved the trick that prevents streaming out <code class="computeroutput"><span class="identifier">optional</span></code>
192 without header <code class="computeroutput"><span class="identifier">optional_io</span><span class="special">.</span><span class="identifier">hpp</span></code>
193 by using safe-bool idiom. This addresses <a href="https://svn.boost.org/trac/boost/ticket/10825" target="_top">Trac
194 #10825</a>.
195 </li>
196<li class="listitem">
197 IOStream operators are now mentioned in documentation.
198 </li>
199<li class="listitem">
200 Added a way to manually disable move semantics: just define macro <code class="computeroutput"><span class="identifier">BOOST_OPTIONAL_CONFIG_NO_RVALUE_REFERENCES</span></code>.
201 This can be used to work around <a href="https://svn.boost.org/trac/boost/ticket/10399" target="_top">Trac
202 #10399</a>.
203 </li>
204<li class="listitem">
205 It is no longer possible to assign <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span></code> to <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> when <code class="computeroutput"><span class="identifier">U</span></code>
206 is not assignable or convertible to <code class="computeroutput"><span class="identifier">T</span></code>
207 (<a href="https://svn.boost.org/trac/boost/ticket/11087" target="_top">Trac #11087</a>).
208 </li>
209<li class="listitem">
210 Value accessors now work correctly on rvalues of <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&amp;&gt;</span></code> (<a href="https://svn.boost.org/trac/boost/ticket/10839" target="_top">Trac
211 #10839</a>).
212 </li>
213</ul></div>
214<h4>
215<a name="boost_optional.relnotes.h9"></a>
216 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_57"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_57">Boost
217 Release 1.57</a>
218 </h4>
219<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
220 <a href="https://github.com/boostorg/optional/pull/9" target="_top">Git pull #9</a>:
221 <span class="emphasis"><em>"Supply <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span></code>
222 to fix C++03 compile error on <code class="computeroutput"><span class="identifier">logic_error</span><span class="special">(</span><span class="string">"..."</span><span class="special">)</span></code>"</em></span>.
223 </li></ul></div>
224<h4>
225<a name="boost_optional.relnotes.h10"></a>
226 <span class="phrase"><a name="boost_optional.relnotes.boost_release_1_56"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_56">Boost
227 Release 1.56</a>
228 </h4>
229<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
230<li class="listitem">
231 Added support for rvalue references. Now <code class="computeroutput"><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> works with moveable but non-copyable
232 <code class="computeroutput"><span class="identifier">T</span></code>'s,
233 </li>
234<li class="listitem">
235 Improved <code class="computeroutput"><span class="identifier">swap</span></code> (now uses
236 move operations),
237 </li>
238<li class="listitem">
239 Added function <code class="computeroutput"><span class="identifier">emplace</span><span class="special">()</span></code>. This is the last of the requests from
240 <a href="https://svn.boost.org/trac/boost/ticket/1841" target="_top">Trac #1841</a>,
241 </li>
242<li class="listitem">
243 <code class="computeroutput"><span class="identifier">optional</span></code> is moveable, including
244 conditional <code class="computeroutput"><span class="keyword">noexcept</span></code> specifications,
245 which make it <code class="computeroutput"><span class="identifier">move_if_noexcept</span></code>-friendly,
246 </li>
247<li class="listitem">
248 Using explicit operator bool() on platforms that support it (<a href="https://svn.boost.org/trac/boost/ticket/4227" target="_top">Trac
249 #4227</a>) (breaking change),
250 </li>
251<li class="listitem">
252 Forward declaration of <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;&lt;(</span><span class="identifier">ostream</span><span class="special">&amp;,</span> <span class="identifier">optional</span>
253 <span class="keyword">const</span><span class="special">&amp;)</span></code>
254 to prevent inadvertent incorrect serialization of optional objects,
255 </li>
256<li class="listitem">
257 Removed deprecated function <code class="computeroutput"><span class="identifier">reset</span><span class="special">()</span></code> from examples (<a href="https://svn.boost.org/trac/boost/ticket/9005" target="_top">Trac
258 #9005</a>),
259 </li>
260<li class="listitem">
261 Equality comparison with <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">none</span></code>
262 does not require that <code class="computeroutput"><span class="identifier">T</span></code>
263 be EqualityComparable,
264 </li>
265<li class="listitem">
266 Optional rvalue references are explicitly disallowed,
267 </li>
268<li class="listitem">
269 Binding temporaries to optional references is explicitly disallowed (breaking
270 change),
271 </li>
272<li class="listitem">
273 More ways to access the contained value, functions <code class="computeroutput"><span class="identifier">value</span><span class="special">()</span></code>, <code class="computeroutput"><span class="identifier">value_or</span><span class="special">()</span></code>, <code class="computeroutput"><span class="identifier">value_or_eval</span><span class="special">()</span></code>,
274 </li>
275<li class="listitem">
276 Updated and reorganized documentation, added tutorial and quick guide sections.
277 </li>
278</ul></div>
279</div>
280<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
281<td align="left"></td>
282<td align="right"><div class="copyright-footer">Copyright &#169; 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright &#169; 2014-2018 Andrzej Krzemie&#324;ski<p>
283 Distributed under the Boost Software License, Version 1.0. (See accompanying
284 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
285 </p>
286</div></td>
287</tr></table>
288<hr>
289<div class="spirit-nav">
290<a accesskey="p" href="dependencies_and_portability/optional_reference_binding.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
291</div>
292</body>
293</html>