mirror of
https://github.com/boostorg/optional.git
synced 2025-07-15 21:32:17 +02:00
Compare commits
52 Commits
boost-1.68
...
boost-1.75
Author | SHA1 | Date | |
---|---|---|---|
45321f321e | |||
18222c8394 | |||
a7f49cbec8 | |||
7e0b8145b5 | |||
2b08711ec6 | |||
88e7d55bbc | |||
9de55e6ffd | |||
409a225afe | |||
db5e156ebc | |||
aeac95857e | |||
d5b7791710 | |||
c486bb724c | |||
19b94c01f3 | |||
404f40bcc1 | |||
9b1f8033eb | |||
e52d7d4a9e | |||
ed9edd54e4 | |||
d2479d6f52 | |||
78d6563bce | |||
d4a4a5b6ad | |||
9581804efa | |||
d07ae78901 | |||
683dbe2412 | |||
010ee00604 | |||
13bc27698e | |||
0481b05d1f | |||
4c863f5bf8 | |||
9ed20cb085 | |||
4fbb7582e1 | |||
29dfc173c6 | |||
f4d1107e86 | |||
324272fc0e | |||
ee575b34c5 | |||
a192204b41 | |||
545fd9a72f | |||
29b2dae630 | |||
2f3cf1ca84 | |||
24d29e5865 | |||
eea107d9b5 | |||
69e239530e | |||
65bb040db8 | |||
fae2791f45 | |||
0f8e356bca | |||
59277bc31f | |||
bebc606a4c | |||
106f9aee5e | |||
350ebab88a | |||
a3916b46a9 | |||
c52280bb78 | |||
b709447922 | |||
cd4e44f3dc | |||
c3abf83426 |
@ -151,6 +151,7 @@ matrix:
|
||||
- llvm-toolchain-precise-3.9
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: clang++-4.0
|
||||
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
@ -162,6 +163,7 @@ matrix:
|
||||
- llvm-toolchain-trusty-4.0
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: clang++-5.0
|
||||
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
|
28
CMakeLists.txt
Normal file
28
CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright 2019 Mike Dev
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
|
||||
#
|
||||
# NOTE: CMake support for Boost.Optional is currently experimental at best
|
||||
# and the interface is likely to change in the future
|
||||
|
||||
cmake_minimum_required( VERSION 3.5 )
|
||||
project( BoostOptional )
|
||||
|
||||
add_library( boost_optional INTERFACE )
|
||||
add_library( Boost::optional ALIAS boost_optional )
|
||||
|
||||
target_include_directories( boost_optional INTERFACE include )
|
||||
|
||||
target_link_libraries( boost_optional
|
||||
INTERFACE
|
||||
Boost::assert
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::detail
|
||||
Boost::move
|
||||
Boost::predef
|
||||
Boost::static_assert
|
||||
Boost::throw_exception
|
||||
Boost::type_traits
|
||||
Boost::utility
|
||||
)
|
@ -17,8 +17,8 @@ namespace boost {
|
||||
|
||||
class none_t {/* see below */};
|
||||
|
||||
const none_t none (/* see below */);
|
||||
|
||||
inline constexpr none_t none (/* see below */);
|
||||
|
||||
} // namespace boost
|
||||
```
|
||||
|
||||
|
@ -196,11 +196,10 @@ They are empty, trivially copyable classes with disabled default constructor.
|
||||
|
||||
bool operator!() const noexcept ; ``[link reference_optional_operator_not __GO_TO__]``
|
||||
|
||||
// deprecated methods
|
||||
|
||||
// (deprecated)
|
||||
void reset() noexcept ; ``[link reference_optional_reset __GO_TO__]``
|
||||
|
||||
// deprecated methods
|
||||
|
||||
// (deprecated)
|
||||
void reset ( T const& ) ; ``[link reference_optional_reset_value __GO_TO__]``
|
||||
|
||||
@ -275,11 +274,10 @@ They are empty, trivially copyable classes with disabled default constructor.
|
||||
|
||||
bool operator!() const noexcept ; ``[link reference_optional_ref_operator_not __GO_TO__]``
|
||||
|
||||
// deprecated methods
|
||||
|
||||
// (deprecated)
|
||||
void reset() noexcept ; ``[link reference_optional_ref_reset __GO_TO__]``
|
||||
|
||||
// deprecated methods
|
||||
|
||||
// (deprecated)
|
||||
template<class R> void reset ( R && r ) noexcept ; ``[link reference_optional_ref_reset_value __GO_TO__]``
|
||||
|
||||
|
@ -541,7 +541,7 @@ __SPACE__
|
||||
[#reference_optional_reset]
|
||||
|
||||
[: `void optional<T>::reset() noexcept ;`]
|
||||
* [*Deprecated:] Same as `operator=( none_t );`
|
||||
* [*Effects:] Same as `operator=( none_t );`
|
||||
|
||||
__SPACE__
|
||||
|
||||
@ -1129,8 +1129,7 @@ __SPACE__
|
||||
|
||||
[#reference_optional_ref_reset]
|
||||
[: `void optional<T&>::reset() noexcept;`]
|
||||
* [*Effects:] Use `*this = none` instead.
|
||||
* [*Remarks:] This function is depprecated.
|
||||
* [*Effects:] Same as `*this = none`.
|
||||
|
||||
__SPACE__
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[/
|
||||
Boost.Optional
|
||||
|
||||
Copyright (c) 2015, 2016 Andrzej Krzemienski
|
||||
Copyright (c) 2015 - 2018 Andrzej Krzemienski
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -11,6 +11,25 @@
|
||||
|
||||
[section:relnotes Release Notes]
|
||||
|
||||
[heading Boost Release 1.75]
|
||||
|
||||
* `boost::none` is `constexpr`-declared.
|
||||
|
||||
* Fixed [@https://github.com/boostorg/optional/issues/78 issue #78].
|
||||
|
||||
[heading Boost Release 1.73]
|
||||
|
||||
* Fixed [@https://github.com/boostorg/optional/issues/78 issue #78].
|
||||
* `boost::none` is now declared as an inline variable (on compilers that support it): there is only one instance of `boost::none` across all translation units.
|
||||
* Fixed a number of compilation errors in GCC 4.4.7 in `optional<T>` for trivial `T`s. Thanks to Robert Leahy for the fix. For details see [@https://github.com/boostorg/optional/pull/80 pr #78].
|
||||
* Now surpressing warning `-Wweak-vtables`.
|
||||
|
||||
[heading Boost Release 1.69]
|
||||
|
||||
* Remove deprecation mark from `reset()` method (without arguments).
|
||||
* Fixed [@https://github.com/boostorg/optional/issues/59 issue #59].
|
||||
* Fixed bug with initialization of certain wrapper types in clang with -std=c++03. See [@https://github.com/boostorg/optional/pull/64 pr #64].
|
||||
|
||||
[heading Boost Release 1.68]
|
||||
|
||||
* Added member function `has_value()` for compatibility with `std::optional` ([@https://github.com/boostorg/optional/issues/52 issue #52]).
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Acknowledgements</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -116,7 +116,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Dependencies and Portability</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -77,7 +77,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Emplace operations in older compilers</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -76,7 +76,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Optional Reference Binding</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -93,7 +93,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Quick Start</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -155,7 +155,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Bypassing unnecessary default construction</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Optional automatic variables</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Optional data members</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -80,7 +80,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Storage in containers</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -50,7 +50,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Header <boost/optional/bad_optional_access.hpp></title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -49,7 +49,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Detailed semantics</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -46,7 +46,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Header <boost/optional.hpp></title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -33,7 +33,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Header <boost/optional/optional_fwd.hpp></title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -52,7 +52,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Detailed Semantics - Free Functions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -507,7 +507,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Detailed Semantics - Optional References</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -486,14 +486,9 @@
|
||||
<a name="reference_optional_ref_reset"></a><div class="blockquote"><blockquote class="blockquote"><p>
|
||||
<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">optional</span><span class="special"><</span><span class="identifier">T</span><span class="special">&>::</span><span class="identifier">reset</span><span class="special">()</span> <span class="keyword">noexcept</span><span class="special">;</span></code>
|
||||
</p></blockquote></div>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
<span class="bold"><strong>Effects:</strong></span> Use <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">=</span> <span class="identifier">none</span></code> instead.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
<span class="bold"><strong>Remarks:</strong></span> This function is depprecated.
|
||||
</li>
|
||||
</ul></div>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
|
||||
<span class="bold"><strong>Effects:</strong></span> Same as <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">=</span> <span class="identifier">none</span></code>.
|
||||
</li></ul></div>
|
||||
<p>
|
||||
<span class="inlinemediaobject"><img src="../../../images/space.png" alt="space"></span>
|
||||
</p>
|
||||
@ -543,7 +538,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Detailed Semantics - Optional Values</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -1199,8 +1199,8 @@
|
||||
<span class="special">;</span></code>
|
||||
</p></blockquote></div>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
|
||||
<span class="bold"><strong>Deprecated:</strong></span> Same as <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span>
|
||||
<span class="identifier">none_t</span> <span class="special">);</span></code>
|
||||
<span class="bold"><strong>Effects:</strong></span> Same as <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span> <span class="identifier">none_t</span>
|
||||
<span class="special">);</span></code>
|
||||
</li></ul></div>
|
||||
<p>
|
||||
<span class="inlinemediaobject"><img src="../../../images/space.png" alt="space"></span>
|
||||
@ -1774,7 +1774,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Initialization tags</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Optional References</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -84,11 +84,10 @@
|
||||
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span> <span class="keyword">noexcept</span> <span class="special">;</span> <a class="link" href="detailed_semantics___optional_references.html#reference_optional_ref_operator_not"><span class="inlinemediaobject"><img src="../../../images/callouts/R.png" alt="R"></span></a>
|
||||
|
||||
<span class="comment">// deprecated methods</span>
|
||||
|
||||
<span class="comment">// (deprecated)</span>
|
||||
<span class="keyword">void</span> <span class="identifier">reset</span><span class="special">()</span> <span class="keyword">noexcept</span> <span class="special">;</span> <a class="link" href="detailed_semantics___optional_references.html#reference_optional_ref_reset"><span class="inlinemediaobject"><img src="../../../images/callouts/R.png" alt="R"></span></a>
|
||||
|
||||
<span class="comment">// deprecated methods</span>
|
||||
|
||||
<span class="comment">// (deprecated)</span>
|
||||
<span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">R</span><span class="special">></span> <span class="keyword">void</span> <span class="identifier">reset</span> <span class="special">(</span> <span class="identifier">R</span> <span class="special">&&</span> <span class="identifier">r</span> <span class="special">)</span> <span class="keyword">noexcept</span> <span class="special">;</span> <a class="link" href="detailed_semantics___optional_references.html#reference_optional_ref_reset_value"><span class="inlinemediaobject"><img src="../../../images/callouts/R.png" alt="R"></span></a>
|
||||
|
||||
@ -105,7 +104,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Optional Values</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -122,11 +122,10 @@
|
||||
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span> <span class="keyword">noexcept</span> <span class="special">;</span> <a class="link" href="detailed_semantics___optional_values.html#reference_optional_operator_not"><span class="inlinemediaobject"><img src="../../../images/callouts/R.png" alt="R"></span></a>
|
||||
|
||||
<span class="comment">// deprecated methods</span>
|
||||
|
||||
<span class="comment">// (deprecated)</span>
|
||||
<span class="keyword">void</span> <span class="identifier">reset</span><span class="special">()</span> <span class="keyword">noexcept</span> <span class="special">;</span> <a class="link" href="detailed_semantics___optional_values.html#reference_optional_reset"><span class="inlinemediaobject"><img src="../../../images/callouts/R.png" alt="R"></span></a>
|
||||
|
||||
<span class="comment">// deprecated methods</span>
|
||||
|
||||
<span class="comment">// (deprecated)</span>
|
||||
<span class="keyword">void</span> <span class="identifier">reset</span> <span class="special">(</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="special">)</span> <span class="special">;</span> <a class="link" href="detailed_semantics___optional_values.html#reference_optional_reset_value"><span class="inlinemediaobject"><img src="../../../images/callouts/R.png" alt="R"></span></a>
|
||||
|
||||
@ -140,7 +139,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Header <boost/optional/optional_io.hpp></title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Detailed semantics</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -32,7 +32,7 @@
|
||||
<span class="special"><</span><span class="keyword">class</span>
|
||||
<span class="identifier">CharType</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">CharTrait</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span></code>
|
||||
<br>     <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span></code> <br>     <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span>
|
||||
<br> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span></code> <br> <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span>
|
||||
<span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="identifier">optional</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">v</span><span class="special">);</span></code>
|
||||
</p>
|
||||
@ -53,8 +53,8 @@
|
||||
</p>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">CharType</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">CharTrait</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span></code> <br>     <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span></code>
|
||||
<br>     <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">none_t</span><span class="special">);</span></code>
|
||||
<span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span></code> <br> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span></code>
|
||||
<br> <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">none_t</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
@ -70,8 +70,8 @@
|
||||
</p>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">CharType</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">CharTrait</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span></code> <br>     <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span></code>
|
||||
<br>     <code class="computeroutput"><span class="keyword">operator</span><span class="special">>>(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span> <span class="identifier">in</span><span class="special">,</span> <span class="identifier">optional</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">);</span></code>
|
||||
<span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span></code> <br> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span></code>
|
||||
<br> <code class="computeroutput"><span class="keyword">operator</span><span class="special">>>(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special"><</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">>&</span> <span class="identifier">in</span><span class="special">,</span> <span class="identifier">optional</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
@ -98,7 +98,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Release Notes</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -28,6 +28,61 @@
|
||||
</h2></div></div></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h0"></a>
|
||||
<span class="phrase"><a name="boost_optional.relnotes.boost_release_1_75"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_75">Boost
|
||||
Release 1.75</a>
|
||||
</h4>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">none</span></code> is <code class="computeroutput"><span class="keyword">constexpr</span></code>-declared.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Fixed <a href="https://github.com/boostorg/optional/issues/78" target="_top">issue
|
||||
#78</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h1"></a>
|
||||
<span class="phrase"><a name="boost_optional.relnotes.boost_release_1_73"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_73">Boost
|
||||
Release 1.73</a>
|
||||
</h4>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
Fixed <a href="https://github.com/boostorg/optional/issues/78" target="_top">issue
|
||||
#78</a>.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">none</span></code> is now declared as an inline variable
|
||||
(on compilers that support it): there is only one instance of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">none</span></code> across all translation units.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Fixed a number of compilation errors in GCC 4.4.7 in <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></code> for trivial <code class="computeroutput"><span class="identifier">T</span></code>s.
|
||||
Thanks to Robert Leahy for the fix. For details see <a href="https://github.com/boostorg/optional/pull/80" target="_top">pr
|
||||
#78</a>.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Now surpressing warning <code class="computeroutput"><span class="special">-</span><span class="identifier">Wweak</span><span class="special">-</span><span class="identifier">vtables</span></code>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h2"></a>
|
||||
<span class="phrase"><a name="boost_optional.relnotes.boost_release_1_69"></a></span><a class="link" href="relnotes.html#boost_optional.relnotes.boost_release_1_69">Boost
|
||||
Release 1.69</a>
|
||||
</h4>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
Remove deprecation mark from <code class="computeroutput"><span class="identifier">reset</span><span class="special">()</span></code> method (without arguments).
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Fixed <a href="https://github.com/boostorg/optional/issues/59" target="_top">issue
|
||||
#59</a>.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Fixed bug with initialization of certain wrapper types in clang with -std=c++03.
|
||||
See <a href="https://github.com/boostorg/optional/pull/64" target="_top">pr #64</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h3"></a>
|
||||
<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
|
||||
Release 1.68</a>
|
||||
</h4>
|
||||
@ -44,7 +99,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h1"></a>
|
||||
<a name="boost_optional.relnotes.h4"></a>
|
||||
<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
|
||||
Release 1.67</a>
|
||||
</h4>
|
||||
@ -58,7 +113,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h2"></a>
|
||||
<a name="boost_optional.relnotes.h5"></a>
|
||||
<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
|
||||
Release 1.66</a>
|
||||
</h4>
|
||||
@ -76,7 +131,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h3"></a>
|
||||
<a name="boost_optional.relnotes.h6"></a>
|
||||
<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
|
||||
Release 1.63</a>
|
||||
</h4>
|
||||
@ -100,7 +155,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h4"></a>
|
||||
<a name="boost_optional.relnotes.h7"></a>
|
||||
<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
|
||||
Release 1.62</a>
|
||||
</h4>
|
||||
@ -108,7 +163,7 @@
|
||||
Fixed <a href="https://svn.boost.org/trac/boost/ticket/12179" target="_top">Trac #12179</a>.
|
||||
</li></ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h5"></a>
|
||||
<a name="boost_optional.relnotes.h8"></a>
|
||||
<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
|
||||
Release 1.61</a>
|
||||
</h4>
|
||||
@ -151,7 +206,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h6"></a>
|
||||
<a name="boost_optional.relnotes.h9"></a>
|
||||
<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
|
||||
Release 1.60</a>
|
||||
</h4>
|
||||
@ -162,7 +217,7 @@
|
||||
#11203</a>.
|
||||
</li></ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h7"></a>
|
||||
<a name="boost_optional.relnotes.h10"></a>
|
||||
<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
|
||||
Release 1.59</a>
|
||||
</h4>
|
||||
@ -176,7 +231,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h8"></a>
|
||||
<a name="boost_optional.relnotes.h11"></a>
|
||||
<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
|
||||
Release 1.58</a>
|
||||
</h4>
|
||||
@ -212,7 +267,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h9"></a>
|
||||
<a name="boost_optional.relnotes.h12"></a>
|
||||
<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
|
||||
Release 1.57</a>
|
||||
</h4>
|
||||
@ -222,7 +277,7 @@
|
||||
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>.
|
||||
</li></ul></div>
|
||||
<h4>
|
||||
<a name="boost_optional.relnotes.h10"></a>
|
||||
<a name="boost_optional.relnotes.h13"></a>
|
||||
<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
|
||||
Release 1.56</a>
|
||||
</h4>
|
||||
@ -279,7 +334,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Design Overview</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -65,8 +65,8 @@
|
||||
<code class="computeroutput"><span class="identifier">npos</span></code>, -1, etc... This is
|
||||
equivalent to adding the special value to the set of possible values of
|
||||
a given type. This super set of <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
plus some <span class="emphasis"><em>nil_t</em></span>—where <code class="computeroutput"><span class="identifier">nil_t</span></code>
|
||||
is some stateless POD—can be modeled in modern languages as a <span class="bold"><strong>discriminated union</strong></span> of T and nil_t. Discriminated
|
||||
plus some <span class="emphasis"><em>nil_t</em></span>—where <code class="computeroutput"><span class="identifier">nil_t</span></code>
|
||||
is some stateless POD—can be modeled in modern languages as a <span class="bold"><strong>discriminated union</strong></span> of T and nil_t. Discriminated
|
||||
unions are often called <span class="emphasis"><em>variants</em></span>. A variant has a
|
||||
<span class="emphasis"><em>current type</em></span>, which in our case is either <code class="computeroutput"><span class="identifier">T</span></code> or <code class="computeroutput"><span class="identifier">nil_t</span></code>.
|
||||
Using the <a href="../../../../../variant/index.html" target="_top">Boost.Variant</a>
|
||||
@ -100,8 +100,8 @@
|
||||
</p>
|
||||
<p>
|
||||
In any event, both the discriminated-union or the single-element container
|
||||
models serve as a conceptual ground for a class representing optional—i.e.
|
||||
possibly uninitialized—objects. For instance, these models show the
|
||||
models serve as a conceptual ground for a class representing optional—i.e.
|
||||
possibly uninitialized—objects. For instance, these models show the
|
||||
<span class="emphasis"><em>exact</em></span> semantics required for a wrapper of optional
|
||||
values:
|
||||
</p>
|
||||
@ -170,7 +170,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>The Interface</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -79,7 +79,7 @@
|
||||
facto</em></span> standard for handling optional objects because all you
|
||||
have to do to refer to a value which you don't really have is to use a
|
||||
null pointer value of the appropriate type. Pointers have been used for
|
||||
decades—from the days of C APIs to modern C++ libraries—to <span class="emphasis"><em>refer</em></span>
|
||||
decades—from the days of C APIs to modern C++ libraries—to <span class="emphasis"><em>refer</em></span>
|
||||
to optional (that is, possibly nonexistent) objects; particularly as optional
|
||||
arguments to a function, but also quite often as optional data members.
|
||||
</p>
|
||||
@ -93,7 +93,7 @@
|
||||
and this information is tied to the <span class="emphasis"><em>syntax</em></span> of the
|
||||
expressions. That is, the presence of operators <code class="computeroutput"><span class="special">*</span></code>
|
||||
and <code class="computeroutput"><span class="special">-></span></code> tell by themselves
|
||||
—without any additional context— that the expression will be undefined
|
||||
—without any additional context— that the expression will be undefined
|
||||
unless the implied pointee actually exist.
|
||||
</p>
|
||||
<p>
|
||||
@ -173,7 +173,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>The semantics</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -107,7 +107,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Exception Safety Guarantees</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -161,7 +161,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Gotchas</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -37,7 +37,7 @@
|
||||
</p>
|
||||
<p>
|
||||
First, it is functionally similar to a tristate boolean (false, maybe,
|
||||
true) —such as <a href="../../../../../../doc/html/tribool.html" target="_top">boost::tribool</a>—
|
||||
true) —such as <a href="../../../../../../doc/html/tribool.html" target="_top">boost::tribool</a>—
|
||||
except that in a tristate boolean, the maybe state <span class="underline">represents
|
||||
a valid value</span>, unlike the corresponding state of an uninitialized
|
||||
<code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="keyword">bool</span><span class="special">></span></code>.
|
||||
@ -98,7 +98,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>False positive with -Wmaybe-uninitialized</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -63,7 +63,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Mixed relational comparisons</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Moved-from optional</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -49,7 +49,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>In-Place Factories</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -183,7 +183,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>IO operators</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -73,7 +73,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Optional references</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -103,7 +103,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Rebinding semantics for assignment of optional references</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -133,7 +133,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Performance considerations</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -251,7 +251,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Relational operators</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -99,7 +99,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Type requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>When to use Optional</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -128,7 +128,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Boost.Optional</title>
|
||||
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -25,8 +25,8 @@
|
||||
<div><div class="author"><h3 class="author">
|
||||
<span class="firstname">Fernando Luis</span> <span class="surname">Cacciola Carballal</span>
|
||||
</h3></div></div>
|
||||
<div><p class="copyright">Copyright © 2003-2007 Fernando Luis Cacciola Carballal</p></div>
|
||||
<div><p class="copyright">Copyright © 2014-2018 Andrzej Krzemieński</p></div>
|
||||
<div><p class="copyright">Copyright © 2003-2007 Fernando Luis Cacciola Carballal</p></div>
|
||||
<div><p class="copyright">Copyright © 2014-2018 Andrzej Krzemieński</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="optional.legal"></a><p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
@ -145,7 +145,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: July 02, 2018 at 21:10:01 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: October 28, 2020 at 21:28:19 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -54,7 +54,7 @@
|
||||
|
||||
<span class="keyword">class</span> <span class="identifier">none_t</span> <span class="special">{/*</span> <span class="identifier">see</span> <span class="identifier">below</span> <span class="special">*/};</span>
|
||||
|
||||
<span class="keyword">const</span> <span class="identifier">none_t</span> <span class="identifier">none</span> <span class="special">(/*</span> <span class="identifier">see</span> <span class="identifier">below</span> <span class="special">*/);</span>
|
||||
<span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">none_t</span> <span class="identifier">none</span> <span class="special">(/*</span> <span class="identifier">see</span> <span class="identifier">below</span> <span class="special">*/);</span>
|
||||
|
||||
<span class="special">}</span> <span class="comment">// namespace boost</span>
|
||||
</pre>
|
||||
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Header <boost/optional/optional.hpp></title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -97,7 +97,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Tutorial</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
@ -139,7 +139,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2018 Andrzej Krzemieński<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
|
@ -13,6 +13,7 @@
|
||||
#ifndef BOOST_NONE_17SEP2003_HPP
|
||||
#define BOOST_NONE_17SEP2003_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/none_t.hpp"
|
||||
|
||||
// NOTE: Borland users have to include this header outside any precompiled headers
|
||||
@ -23,7 +24,7 @@ namespace boost {
|
||||
|
||||
#ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
|
||||
|
||||
none_t const none = (static_cast<none_t>(0)) ;
|
||||
BOOST_INLINE_VARIABLE none_t BOOST_CONSTEXPR_OR_CONST none = (static_cast<none_t>(0)) ;
|
||||
|
||||
#elif defined BOOST_OPTIONAL_USE_SINGLETON_DEFINITION_OF_NONE
|
||||
|
||||
@ -35,7 +36,7 @@ namespace detail { namespace optional_detail {
|
||||
{
|
||||
static const T instance;
|
||||
};
|
||||
|
||||
|
||||
template <typename T>
|
||||
const T none_instance<T>::instance = T(); // global, but because 'tis a template, no cpp file required
|
||||
|
||||
@ -44,16 +45,15 @@ namespace detail { namespace optional_detail {
|
||||
|
||||
namespace {
|
||||
// TU-local
|
||||
const none_t& none = detail::optional_detail::none_instance<none_t>::instance;
|
||||
const none_t& none = detail::optional_detail::none_instance<none_t>::instance;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
const none_t none ((none_t::init_tag()));
|
||||
BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST none_t none ((none_t::init_tag()));
|
||||
|
||||
#endif // older definitions
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // header guard
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
#ifndef BOOST_NONE_T_17SEP2003_HPP
|
||||
#define BOOST_NONE_T_17SEP2003_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
#ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
|
||||
@ -29,7 +31,7 @@ class none_t {};
|
||||
struct none_t
|
||||
{
|
||||
struct init_tag{};
|
||||
explicit none_t(init_tag){} // to disable default constructor
|
||||
explicit BOOST_CONSTEXPR none_t(init_tag){} // to disable default constructor
|
||||
};
|
||||
|
||||
#endif // old implementation workarounds
|
||||
|
@ -19,6 +19,11 @@
|
||||
|
||||
namespace boost {
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wweak-vtables"
|
||||
#endif
|
||||
|
||||
class bad_optional_access : public std::logic_error
|
||||
{
|
||||
public:
|
||||
@ -27,6 +32,10 @@ public:
|
||||
{}
|
||||
};
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
@ -14,10 +14,9 @@
|
||||
#define BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
|
||||
|
||||
#include <boost/detail/reference_content.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/conditional.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
@ -80,7 +79,7 @@ class optional_base : public optional_tag
|
||||
private :
|
||||
|
||||
typedef
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
#endif
|
||||
::boost::detail::make_reference_content<T>::type internal_type ;
|
||||
@ -96,13 +95,13 @@ class optional_base : public optional_tag
|
||||
|
||||
typedef T value_type ;
|
||||
|
||||
typedef mpl::true_ is_reference_tag ;
|
||||
typedef mpl::false_ is_not_reference_tag ;
|
||||
typedef true_type is_reference_tag ;
|
||||
typedef false_type is_not_reference_tag ;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
|
||||
|
||||
public:
|
||||
typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
|
||||
typedef BOOST_DEDUCED_TYPENAME conditional<is_reference_predicate::value,types_when_ref,types_when_not_ref>::type types ;
|
||||
|
||||
protected:
|
||||
typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ;
|
||||
@ -333,7 +332,7 @@ class optional_base : public optional_tag
|
||||
|
||||
public :
|
||||
|
||||
// **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// No-throw (assuming T::~T() doesn't)
|
||||
void reset() BOOST_NOEXCEPT { destroy(); }
|
||||
|
||||
@ -422,7 +421,7 @@ class optional_base : public optional_tag
|
||||
template<class Expr>
|
||||
void construct ( Expr&& factory, in_place_factory_base const* )
|
||||
{
|
||||
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
||||
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
||||
boost_optional_detail::construct<value_type>(factory, m_storage.address());
|
||||
m_initialized = true ;
|
||||
}
|
||||
@ -431,7 +430,7 @@ class optional_base : public optional_tag
|
||||
template<class Expr>
|
||||
void construct ( Expr&& factory, typed_in_place_factory_base const* )
|
||||
{
|
||||
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
||||
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
||||
factory.apply(m_storage.address()) ;
|
||||
m_initialized = true ;
|
||||
}
|
||||
@ -456,7 +455,7 @@ class optional_base : public optional_tag
|
||||
template<class Expr>
|
||||
void construct ( Expr const& factory, in_place_factory_base const* )
|
||||
{
|
||||
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
||||
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
||||
boost_optional_detail::construct<value_type>(factory, m_storage.address());
|
||||
m_initialized = true ;
|
||||
}
|
||||
@ -465,7 +464,7 @@ class optional_base : public optional_tag
|
||||
template<class Expr>
|
||||
void construct ( Expr const& factory, typed_in_place_factory_base const* )
|
||||
{
|
||||
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
||||
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
||||
factory.apply(m_storage.address()) ;
|
||||
m_initialized = true ;
|
||||
}
|
||||
@ -620,7 +619,7 @@ class optional_base : public optional_tag
|
||||
reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; }
|
||||
reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; }
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x581))
|
||||
void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; }
|
||||
#else
|
||||
void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->~T() ; m_initialized = false ; }
|
||||
|
@ -28,7 +28,7 @@
|
||||
# define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x551)
|
||||
// BCB (5.5.1) cannot parse the nested template struct in an inplace factory.
|
||||
# define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@ class tc_optional_base : public optional_tag
|
||||
:
|
||||
m_initialized(false) {}
|
||||
|
||||
tc_optional_base ( argument_type val )
|
||||
tc_optional_base ( init_value_tag, argument_type val )
|
||||
:
|
||||
m_initialized(true), m_storage(val) {}
|
||||
|
||||
@ -71,7 +71,7 @@ class tc_optional_base : public optional_tag
|
||||
// Assigns from another optional<T> (deep-copies the rhs value)
|
||||
void assign ( tc_optional_base const& rhs )
|
||||
{
|
||||
this->operator=(rhs);
|
||||
*this = rhs;
|
||||
}
|
||||
|
||||
// Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
|
||||
@ -127,7 +127,7 @@ class tc_optional_base : public optional_tag
|
||||
|
||||
public :
|
||||
|
||||
// **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// No-throw (assuming T::~T() doesn't)
|
||||
void reset() BOOST_NOEXCEPT { destroy(); }
|
||||
|
||||
@ -359,7 +359,7 @@ class tc_optional_base : public optional_tag
|
||||
template<class Expr>
|
||||
void construct ( Expr const& factory, in_place_factory_base const* )
|
||||
{
|
||||
boost_optional_detail::construct<value_type>(factory, m_storage.address());
|
||||
boost_optional_detail::construct<value_type>(factory, boost::addressof(m_storage));
|
||||
m_initialized = true ;
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,9 @@ using optional_ns::in_place_init_if;
|
||||
|
||||
namespace optional_detail {
|
||||
|
||||
struct optional_tag {} ;
|
||||
struct init_value_tag {};
|
||||
|
||||
struct optional_tag {};
|
||||
|
||||
|
||||
template<class T>
|
||||
@ -147,7 +149,7 @@ class optional_base : public optional_tag
|
||||
|
||||
// Creates an optional<T> initialized with 'val'.
|
||||
// Can throw if T::T(T const&) does
|
||||
optional_base ( argument_type val )
|
||||
optional_base ( init_value_tag, argument_type val )
|
||||
:
|
||||
m_initialized(false)
|
||||
{
|
||||
@ -157,7 +159,7 @@ class optional_base : public optional_tag
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
// move-construct an optional<T> initialized from an rvalue-ref to 'val'.
|
||||
// Can throw if T::T(T&&) does
|
||||
optional_base ( rval_reference_type val )
|
||||
optional_base ( init_value_tag, rval_reference_type val )
|
||||
:
|
||||
m_initialized(false)
|
||||
{
|
||||
@ -378,7 +380,7 @@ class optional_base : public optional_tag
|
||||
|
||||
public :
|
||||
|
||||
// **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// No-throw (assuming T::~T() doesn't)
|
||||
void reset() BOOST_NOEXCEPT { destroy(); }
|
||||
|
||||
@ -775,7 +777,7 @@ class optional_base : public optional_tag
|
||||
|
||||
#include <boost/optional/detail/optional_trivially_copyable_base.hpp>
|
||||
|
||||
// definition of metafunciton is_optional_val_init_candidate
|
||||
// definition of metafunction is_optional_val_init_candidate
|
||||
template <typename U>
|
||||
struct is_optional_related
|
||||
: boost::conditional< boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
|
||||
@ -811,9 +813,14 @@ struct is_optional_constructible : boost::true_type
|
||||
|
||||
#endif // is_convertible condition
|
||||
|
||||
template <typename T, typename U>
|
||||
template <typename T, typename U, bool = is_optional_related<U>::value>
|
||||
struct is_optional_val_init_candidate
|
||||
: boost::conditional< !is_optional_related<U>::value && is_convertible_to_T_or_factory<T, U>::value
|
||||
: boost::false_type
|
||||
{};
|
||||
|
||||
template <typename T, typename U>
|
||||
struct is_optional_val_init_candidate<T, U, false>
|
||||
: boost::conditional< is_convertible_to_T_or_factory<T, U>::value
|
||||
, boost::true_type, boost::false_type>::type
|
||||
{};
|
||||
|
||||
@ -870,12 +877,12 @@ class optional
|
||||
|
||||
// Creates an optional<T> initialized with 'val'.
|
||||
// Can throw if T::T(T const&) does
|
||||
optional ( argument_type val ) : base(val) {}
|
||||
optional ( argument_type val ) : base(optional_detail::init_value_tag(), val) {}
|
||||
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
// Creates an optional<T> initialized with 'move(val)'.
|
||||
// Can throw if T::T(T &&) does
|
||||
optional ( rval_reference_type val ) : base( boost::forward<T>(val) )
|
||||
optional ( rval_reference_type val ) : base(optional_detail::init_value_tag(), boost::forward<T>(val))
|
||||
{}
|
||||
#endif
|
||||
|
||||
@ -965,7 +972,7 @@ class optional
|
||||
// Can throw if T::T(T&&) does
|
||||
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
|
||||
optional ( optional && rhs ) = default;
|
||||
optional ( optional && ) = default;
|
||||
#else
|
||||
optional ( optional && rhs )
|
||||
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
|
||||
|
@ -18,6 +18,7 @@ import testing ;
|
||||
{
|
||||
test-suite optional :
|
||||
[ run optional_test.cpp ]
|
||||
[ run optional_test_assign.cpp ]
|
||||
[ run optional_test_swap.cpp ]
|
||||
[ run optional_test_conversions_from_U.cpp ]
|
||||
[ run optional_test_convert_from_T.cpp ]
|
||||
@ -49,6 +50,8 @@ import testing ;
|
||||
[ run optional_test_member_T.cpp ]
|
||||
[ run optional_test_tc_base.cpp ]
|
||||
[ compile optional_test_sfinae_friendly_ctor.cpp ]
|
||||
[ compile optional_test_path_assignment.cpp ]
|
||||
[ compile-fail optional_test_fail_const_swap.cpp ]
|
||||
[ compile-fail optional_test_ref_convert_assign_const_int_prevented.cpp ]
|
||||
[ compile-fail optional_test_fail1.cpp ]
|
||||
[ compile-fail optional_test_fail3a.cpp ]
|
||||
@ -74,6 +77,7 @@ import testing ;
|
||||
[ run optional_test_static_properties.cpp ]
|
||||
[ compile optional_test_maybe_uninitialized_warning.cpp ]
|
||||
[ compile optional_test_deleted_default_ctor.cpp ]
|
||||
[ compile optional_test_constructible_from_other.cpp ]
|
||||
#[ run optional_xconfig_HACK_TO_LIST_PREDEFINED_MACROS.cpp ]
|
||||
[ run optional_xconfig_NO_PROPER_ASSIGN_FROM_CONST_INT_pass.cpp ]
|
||||
[ run-fail optional_xconfig_NO_PROPER_ASSIGN_FROM_CONST_INT_fail.cpp ]
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
30
test/optional_test_assign.cpp
Normal file
30
test/optional_test_assign.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2018 Andrzej Krzemienski.
|
||||
//
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/lib/optional for documentation.
|
||||
//
|
||||
// You are welcome to contact the author at:
|
||||
// akrzemi1@gmail.com
|
||||
|
||||
#include "boost/core/lightweight_test.hpp"
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
void test_assignment_to_empty()
|
||||
{
|
||||
// this test used to fail on GCC 8.1.0/8.2.0/9.0.0 with -std=c++98
|
||||
boost::optional<int> oa, ob(1);
|
||||
BOOST_TEST(!oa);
|
||||
BOOST_TEST(ob);
|
||||
|
||||
oa = ob;
|
||||
BOOST_TEST(oa);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test_assignment_to_empty();
|
||||
return boost::report_errors();
|
||||
}
|
59
test/optional_test_constructible_from_other.cpp
Normal file
59
test/optional_test_constructible_from_other.cpp
Normal file
@ -0,0 +1,59 @@
|
||||
// Copyright (c) 2018 Andrey Semashev
|
||||
//
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// The test verifies that Boost.Optional copy constructors do not attempt to invoke
|
||||
// the element type initializing constructors from templated arguments
|
||||
|
||||
#include <boost/optional/optional.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
|
||||
struct no_type
|
||||
{
|
||||
char data;
|
||||
};
|
||||
|
||||
struct yes_type
|
||||
{
|
||||
char data[2];
|
||||
};
|
||||
|
||||
template< unsigned int Size >
|
||||
struct size_tag {};
|
||||
|
||||
template< typename T, typename U >
|
||||
struct is_constructible
|
||||
{
|
||||
static U& get();
|
||||
|
||||
template< typename T1 >
|
||||
static yes_type check_helper(size_tag< sizeof(static_cast< T1 >(get())) >*);
|
||||
template< typename T1 >
|
||||
static no_type check_helper(...);
|
||||
|
||||
static const bool value = sizeof(check_helper< T >(0)) == sizeof(yes_type);
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
class wrapper
|
||||
{
|
||||
public:
|
||||
wrapper() {}
|
||||
wrapper(wrapper const&) {}
|
||||
template< typename U >
|
||||
wrapper(U const&, typename boost::enable_if_c< is_constructible< T, U >::value, int >::type = 0) {}
|
||||
};
|
||||
|
||||
inline boost::optional< wrapper< int > > foo()
|
||||
{
|
||||
return boost::optional< wrapper< int > >();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
// Invokes boost::optional copy constructor. Should not invoke wrapper constructor from U.
|
||||
boost::optional< wrapper< int > > res = foo();
|
||||
return 0;
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
// Copyright 2017 Peter Dimov
|
||||
// Copyright 2017 Vinnie Falco
|
||||
// Copyright 2018 Andrzej Krzemienski
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
//
|
||||
@ -19,8 +21,8 @@ int main()
|
||||
|
||||
class basic_multi_buffer;
|
||||
|
||||
class const_buffers_type
|
||||
{
|
||||
class const_buffers_type // a similar declaration in boost.beast had problem
|
||||
{ // with boost opitonal
|
||||
basic_multi_buffer const* b_;
|
||||
|
||||
friend class basic_multi_buffer;
|
||||
@ -29,16 +31,36 @@ class const_buffers_type
|
||||
const_buffers_type(basic_multi_buffer const& b);
|
||||
|
||||
public:
|
||||
|
||||
const_buffers_type() = delete;
|
||||
const_buffers_type(const_buffers_type const&) = default;
|
||||
const_buffers_type& operator=(const_buffers_type const&) = default;
|
||||
};
|
||||
|
||||
void test_beast_example()
|
||||
{
|
||||
// test if it even compiles
|
||||
boost::optional< std::pair<const_buffers_type, int> > opt, opt2;
|
||||
opt = opt2;
|
||||
(void)opt;
|
||||
}
|
||||
|
||||
struct NotDefaultConstructible // minimal class exposing the problem
|
||||
{
|
||||
NotDefaultConstructible() = delete;
|
||||
};
|
||||
|
||||
void test_assign_for_non_default_constructible()
|
||||
{
|
||||
// test if it even compiles
|
||||
boost::optional<NotDefaultConstructible> opt, opt2;
|
||||
opt = opt2;
|
||||
(void)opt;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::optional< std::pair<const_buffers_type, int> > opt, opt2;
|
||||
opt = opt2;
|
||||
test_beast_example();
|
||||
test_assign_for_non_default_constructible();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -11,10 +11,11 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include "boost/core/lightweight_test.hpp"
|
||||
#include "boost/none.hpp"
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
26
test/optional_test_fail_const_swap.cpp
Normal file
26
test/optional_test_fail_const_swap.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright (C) 2018, Andrzej Krzemienski.
|
||||
//
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/lib/optional for documentation.
|
||||
//
|
||||
// You are welcome to contact the author at:
|
||||
// akrzemi1@gmail.com
|
||||
|
||||
#include "boost/optional.hpp"
|
||||
|
||||
// THIS TEST SHOULD FAIL TO COMPILE
|
||||
|
||||
void test_converitng_assignment_of_different_enums()
|
||||
{
|
||||
const boost::optional<int> o1(1);
|
||||
const boost::optional<int> o2(2);
|
||||
swap(o1, o2); // no swap on const objects should compile
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test_converitng_assignment_of_different_enums();
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include<string>
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
@ -31,10 +31,10 @@ struct Guard
|
||||
std::string str;
|
||||
Guard() : num() {}
|
||||
Guard(double num_, std::string str_) : num(num_), str(str_) {}
|
||||
|
||||
|
||||
friend bool operator==(const Guard& lhs, const Guard& rhs) { return lhs.num == rhs.num && lhs.str == rhs.str; }
|
||||
friend bool operator!=(const Guard& lhs, const Guard& rhs) { return !(lhs == rhs); }
|
||||
|
||||
|
||||
private:
|
||||
Guard(const Guard&);
|
||||
Guard& operator=(const Guard&);
|
||||
@ -44,26 +44,30 @@ void test_ctor()
|
||||
{
|
||||
#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
|
||||
Guard g0, g1(1.0, "one"), g2(2.0, "two");
|
||||
|
||||
|
||||
boost::optional<Guard> og0 ( boost::in_place() );
|
||||
boost::optional<Guard> og1 ( boost::in_place(1.0, "one") );
|
||||
boost::optional<Guard> og1_( boost::in_place(1.0, "one") );
|
||||
boost::optional<Guard> og2 ( boost::in_place<Guard>(2.0, "two") );
|
||||
|
||||
|
||||
BOOST_TEST(og0);
|
||||
BOOST_TEST(og1);
|
||||
BOOST_TEST(og1_);
|
||||
BOOST_TEST(og2);
|
||||
|
||||
|
||||
BOOST_TEST(*og0 == g0);
|
||||
BOOST_TEST(*og1 == g1);
|
||||
BOOST_TEST(*og1_ == g1);
|
||||
BOOST_TEST(*og2 == g2);
|
||||
|
||||
|
||||
BOOST_TEST(og1_ == og1);
|
||||
BOOST_TEST(og1_ != og2);
|
||||
BOOST_TEST(og1_ != og0);
|
||||
#endif
|
||||
|
||||
boost::optional<unsigned int> o( boost::in_place(5) );
|
||||
BOOST_TEST(o);
|
||||
BOOST_TEST(*o == 5);
|
||||
#endif
|
||||
}
|
||||
|
||||
void test_assign()
|
||||
@ -71,27 +75,32 @@ void test_assign()
|
||||
#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
|
||||
#ifndef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
|
||||
Guard g0, g1(1.0, "one"), g2(2.0, "two");
|
||||
|
||||
|
||||
boost::optional<Guard> og0, og1, og1_, og2;
|
||||
|
||||
|
||||
og0 = boost::in_place();
|
||||
og1 = boost::in_place(1.0, "one");
|
||||
og1_ = boost::in_place(1.0, "one");
|
||||
og2 = boost::in_place<Guard>(2.0, "two");
|
||||
|
||||
|
||||
BOOST_TEST(og0);
|
||||
BOOST_TEST(og1);
|
||||
BOOST_TEST(og1_);
|
||||
BOOST_TEST(og2);
|
||||
|
||||
|
||||
BOOST_TEST(*og0 == g0);
|
||||
BOOST_TEST(*og1 == g1);
|
||||
BOOST_TEST(*og1_ == g1);
|
||||
BOOST_TEST(*og2 == g2);
|
||||
|
||||
|
||||
BOOST_TEST(og1_ == og1);
|
||||
BOOST_TEST(og1_ != og2);
|
||||
BOOST_TEST(og1_ != og0);
|
||||
|
||||
boost::optional<unsigned int> o;
|
||||
o = boost::in_place(5);
|
||||
BOOST_TEST(o);
|
||||
BOOST_TEST(*o == 5);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@ -101,4 +110,4 @@ int main()
|
||||
test_ctor();
|
||||
test_assign();
|
||||
return boost::report_errors();
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include<string>
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include<string>
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "boost/optional/optional.hpp"
|
||||
#include "boost/optional/optional_io.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,10 +11,11 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include "boost/core/lightweight_test.hpp"
|
||||
#include "boost/none.hpp"
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define BOOST_OPTIONAL_CONFIG_NO_RVALUE_REFERENCES
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "boost/static_assert.hpp"
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL // does old implementation still work for basic usage?
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
73
test/optional_test_path_assignment.cpp
Normal file
73
test/optional_test_path_assignment.cpp
Normal file
@ -0,0 +1,73 @@
|
||||
// Copyright (C) 2019 Andrzej Krzemienski.
|
||||
//
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/lib/optional for documentation.
|
||||
//
|
||||
// You are welcome to contact the author at:
|
||||
// akrzemi1@gmail.com
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
|
||||
template <typename, typename>
|
||||
struct void_t
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
|
||||
template <typename T, typename = void>
|
||||
struct trait
|
||||
{
|
||||
};
|
||||
|
||||
// the following trait emulates properties std::iterator_traits
|
||||
template <typename T>
|
||||
struct trait<T, BOOST_DEDUCED_TYPENAME void_t<BOOST_DEDUCED_TYPENAME T::value_type,
|
||||
BOOST_DEDUCED_TYPENAME boost::enable_if<boost::is_constructible<T, T&> >::type
|
||||
>::type>
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
|
||||
};
|
||||
|
||||
// This class emulates the properties of std::filesystem::path
|
||||
struct Path
|
||||
{
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
template <typename T, typename = BOOST_DEDUCED_TYPENAME trait<T>::value_type>
|
||||
Path(T const&);
|
||||
#else
|
||||
template <typename T>
|
||||
Path(T const&, BOOST_DEDUCED_TYPENAME trait<T>::value_type* = 0);
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
|
||||
|
||||
boost::optional<Path> optFs1;
|
||||
boost::optional<Path> optFs2;
|
||||
|
||||
optFs1 = optFs2;
|
||||
|
||||
// the following still fails although it shouldn't
|
||||
//BOOST_STATIC_ASSERT((std::is_copy_constructible<boost::optional<Path>>::value));
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
@ -93,7 +93,9 @@ template <typename T>
|
||||
void test_all_const_cases()
|
||||
{
|
||||
test_converting_ctor<T>();
|
||||
#ifndef BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT
|
||||
test_converting_ctor<const T>();
|
||||
#endif
|
||||
test_converting_ctor_for_noconst_const<T>();
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "boost/optional/optional.hpp"
|
||||
#include "boost/utility/in_place_factory.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
@ -58,10 +58,20 @@ struct W
|
||||
|
||||
void test_value_init()
|
||||
{
|
||||
#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
{
|
||||
S s;
|
||||
W<S> w{s};
|
||||
}
|
||||
#endif
|
||||
{
|
||||
S s;
|
||||
W<S> w(s);
|
||||
}
|
||||
}
|
||||
|
||||
void test_optoinal_reference_wrapper()
|
||||
{
|
||||
boost::optional<W<S&> > o;
|
||||
BOOST_TEST(boost::none == o);
|
||||
}
|
||||
@ -70,6 +80,7 @@ int main()
|
||||
{
|
||||
test_tc_base();
|
||||
test_value_init();
|
||||
test_optoinal_reference_wrapper();
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user