Andrzej Krzemienski
8fc2901fad
explicit operator bool becomes noexcept
2014-06-14 00:46:24 +02:00
Andrzej Krzemienski
fdc98d17ca
Added limited emplace() for older compilers
2014-06-06 23:24:43 +02:00
Andrzej Krzemienski
3dd614fd91
Reorganized docs. Minor code fix wrt opt refs
2014-06-04 18:13:06 +02:00
Andrzej Krzemienski
f99618f09b
Added ref-qualifiers to some accessors
2014-06-03 23:07:19 +02:00
Andrzej Krzemienski
2e583aaf30
Fixed code, updated docs, added emplace()
2014-06-03 17:36:18 +02:00
Andrzej Krzemienski
3984c9f9a1
Added function value_or()
2014-05-23 16:38:42 +02:00
Andrzej Krzemienski
75271b73a8
Member fun value() that throws on uninitialized
2014-05-22 23:32:49 +02:00
Andrey Semashev
5e59e10f93
Fix warnings with gcc 4.4 in C++11 mode
...
GCC 4.4 has support for an early draft of rvalue references. When compiling the conforming code it produces warnings such as '../boost/optional/optional.hpp:152: warning: returning reference to temporary'. In order to fix this regression use a special implementation of move(), similar to std::move() on this compiler.
2014-05-22 10:15:11 +04:00
Andrzej Krzemienski
e9f5ed41be
binding to rvalues can be reenabled with a macro
2014-05-13 14:11:17 +02:00
Andrzej Krzemienski
f94846ccc5
Improved documentation. Added some noexcept.
2014-05-07 17:07:12 +02:00
Andrzej Krzemienski
6a790e0c97
Added a test that tests the compiler if references are bound correctly. Also added the second copyright notice.
2014-05-05 19:08:11 +02:00
Andrzej Krzemienski
86e759fb89
optional<const T&>::rval_reference_type is now T&& (not const T&)
2014-05-02 18:41:23 +02:00
Andrzej Krzemienski
897fdad11b
Changed incorrect types in static assertions guarding against binding temporaries to optional refs
2014-05-02 15:41:43 +02:00
Andrzej Krzemienski
c51f3e810b
The (in)equality comparison with boost::none does not require that T be EqualityComparable
2014-04-29 22:59:06 +02:00
Andrzej Krzemienski
d59f47156f
Merge branch 'feature/move-semantics' into develop
...
Conflicts:
doc/html/index.html
include/boost/optional/optional.hpp
test/Jamfile.v2
2014-04-29 01:24:10 +02:00
Andrzej Krzemienski
c9f1422560
Updated documentation; fixed optional::swap
2014-04-29 01:06:14 +02:00
Andrzej Krzemienski
01b22a0ff0
Added tests for move conversion between optional<T> and optional<U>
2014-04-28 16:51:49 +02:00
Andrzej Krzemienski
3816143646
Disabled assignment and construction from rvalue references in optional<const T&>
2014-04-28 15:48:55 +02:00
Andrzej Krzemienski
0e61751fab
Added more tests for move operations, fixed bugs, disabled optional<T&&>.
2014-04-26 23:24:21 +02:00
Marcel Raad
c7cf80e5df
Use BOOST_EXPLICIT_OPERATOR_BOOL for optional
...
I often have the problem that when I change a std::wstring to boost::optional<std::wstring> and the variable is used as a parameter with Boost.Format, the result silently changes from the string contents to "1".
This change prevents implicit conversion to bool if the compiler supports explicit conversion operators.
2014-04-26 15:26:37 +02:00
Andrzej Krzemienski
5c69bac12f
Fixed unit tests (still need to add more unit tests for move semantics)
2014-04-26 00:22:39 +02:00
Andrzej Krzemienski
a26d11be87
Partially added move semantics (tests are still failing)
2014-04-22 22:36:19 +02:00
Andrzej Krzemienski
587ef8e988
Added 'raw' move semantics; no unit-tests
2014-04-14 23:44:34 +02:00
Stephen Kelly
3cf0363668
Optional: Remove obsolete GCC version checks.
...
[SVN r86068]
2013-09-30 15:58:48 +00:00
Stephen Kelly
c9ead30713
Remove use of obsolete BOOST_NO_TEMPLATED_STREAMS macro.
...
It was only defined for no-longer-supported-gcc.
[SVN r86062]
2013-09-30 15:56:52 +00:00
Stephen Kelly
931cf3941b
Optional: Remove obsolete MSVC version checks.
...
[SVN r86019]
2013-09-30 00:17:11 +00:00
Steven Watanabe
655eb739fa
Add a forward declaration of the ostream operator for optional. Fixes #2103 .
...
[SVN r82930]
2013-02-16 19:32:20 +00:00
Steven Watanabe
e8853f23cd
Use __may_alias__ instead of may_alias. Fixes #6410 .
...
[SVN r82919]
2013-02-16 02:48:46 +00:00
Steven Watanabe
ff48f2b3a0
Work around msvc bug when explicitly destroying a class with a virtual base. Fixes #5940 .
...
[SVN r82915]
2013-02-15 19:22:34 +00:00
Vicente J. Botet Escriba
f6db3d6bc3
Optional: fix some unused parameter warnings
...
[SVN r81031]
2012-10-21 06:30:04 +00:00
Andrey Semashev
e9989b260e
Refs #4987 . Added forward declaration of namespace-scope swap for boost::optional, this should fix GCC compilation errors. Also swap implementation now uses Boost.Utility.Swap to make use of the workarounds for some broken compilers. If it breaks for your compiler, let me know in the mentioned ticket.
...
[SVN r67288]
2010-12-17 21:12:56 +00:00
Andrey Semashev
646488e0e2
operator>> behavior changed slightly so that the stream is not accessed when unrecognized character sequence is detected.
...
[SVN r67184]
2010-12-12 11:35:19 +00:00
Andrey Semashev
64d8062621
The may_alias workaround is also disabled for GCC prior to 3.2. Also added description for this workaround.
...
[SVN r67112]
2010-12-08 18:32:36 +00:00
Ralf W. Grosse-Kunstleve
d39627c5b6
boost/optional/optional.hpp: avoid gcc 3.2 warnings
...
[SVN r67109]
2010-12-08 17:53:29 +00:00
Andrey Semashev
f88c8ae423
Refs #3395 . Optional construction and assignment now works correctly for types with overridden operator&. Also silenced some GCC warnings about broken strict aliasing rules.
...
[SVN r67020]
2010-12-05 14:43:18 +00:00
Sebastian Redl
ab01dfff7e
Fully qualify ios flags. Fixes compilation of PropertyTree, bug 4459.
...
[SVN r64342]
2010-07-25 22:21:45 +00:00
Fernando Cacciola
8608ad1497
Fixed behaviour in case of invalid input
...
[SVN r64208]
2010-07-20 19:21:44 +00:00
Fernando Cacciola
c93e5a88c7
Fixed extraction operator for empty optionals
...
[SVN r64206]
2010-07-20 18:20:40 +00:00
Daniel James
97e314f03a
Fix some header links.
...
[SVN r64006]
2010-07-14 08:15:33 +00:00
Douglas Gregor
16f0a0aaaf
Expose the "types" typedef of boost::optional_detail::operator_base as
...
public, rather than protected, since Spirit pokes at this typedef.
[SVN r61832]
2010-05-06 21:44:18 +00:00
Gennadiy Rozental
8682f2bbaa
avoid C style casts
...
[SVN r53671]
2009-06-06 09:42:41 +00:00
Niels Dekker
43eac5bb12
Added forward declaration of boost::optional_swap_should_use_default_constructor.
...
[SVN r45264]
2008-05-10 14:42:49 +00:00
Niels Dekker
74674531c8
Replaced "using std::swap" by "using boost::swap" within optional::swap member function, hoping to fix GCC test failures, as mentioned at http://article.gmane.org/gmane.comp.lib.boost.devel/174350 "Re: [optional] problems with swap()"
...
[SVN r44826]
2008-04-27 21:09:50 +00:00
Niels Dekker
a4572497be
Added forward declaration of optional<T>'s boost::swap overload, as mentioned at http://article.gmane.org/gmane.comp.lib.boost.devel/174350 "Re: [optional] problems with swap()"
...
[SVN r44825]
2008-04-27 21:07:10 +00:00
Niels Dekker
66c366d18a
Improved swap for optional<T>, co-written by Thorsten and Fernando: added support for tweaking whether swap should use T's default constructor. Added swap member function. Discussed at Boost developers' mailing list, "[optional] problems with swap()", http://lists.boost.org/Archives/boost/2008/04/135882.php
...
[SVN r44766]
2008-04-25 16:50:32 +00:00
Fernando Cacciola
95c864e119
Cast to base added to avoid a call to the convertir constructor/assignment (see Tickes 1419 and 1420)
...
[SVN r41381]
2007-11-25 20:26:14 +00:00
Beman Dawes
9afdbe65e7
// Add or correct comment identifying Boost library this header is associated with.
...
[SVN r41173]
2007-11-17 20:13:16 +00:00
Fernando Cacciola
3499d477dc
Merged changests from RC_1_34_0 - base rev 33417
...
[SVN r40705]
2007-11-02 22:56:23 +00:00
Gennaro Prota
16a8ccbecc
removed unnamed namespace (see http://lists.boost.org/Archives/boost/2006/07/107873.php ); usual copyright/license/url fixes
...
[SVN r34646]
2006-07-20 23:17:22 +00:00
Fernando Cacciola
734e5b5283
Some additional functions added to optional (being new there won't be regressions)
...
[SVN r34411]
2006-06-26 18:01:38 +00:00
Dave Abrahams
a77dff3e11
workaround for Borland
...
[SVN r34288]
2006-06-12 19:02:41 +00:00
Hartmut Kaiser
9516a779fe
Disambiguated certain constructs.
...
[SVN r34227]
2006-06-08 01:47:33 +00:00
Fernando Cacciola
c7e74ce372
Fixed bug in optional_io
...
[SVN r32979]
2006-02-17 21:15:58 +00:00
Fernando Cacciola
91bdde095d
Non-templated iostreams fix in optional_io
...
Better "illegal conversion" fail test
[SVN r32972]
2006-02-16 20:52:55 +00:00
Fernando Cacciola
0e10374194
AlisdairM BCB2006 patch reapplied to HEAD
...
[SVN r32820]
2006-02-10 20:52:25 +00:00
Fernando Cacciola
864adf2e87
Now commited in HEAD
...
[SVN r32748]
2006-02-08 19:29:54 +00:00
Fernando Cacciola
0be943c2f6
Added simple operators << and >> to optional<>
...
[SVN r32533]
2006-02-03 21:39:21 +00:00
John Maddock
f89c517fa8
Large patch from Ulrich Eckhardt to fix support for EVC++ 4.
...
[SVN r30670]
2005-08-25 16:27:28 +00:00
Rene Rivera
dda39772ad
Fix doubled EOLs.
...
[SVN r28438]
2005-04-23 16:35:57 +00:00
Douglas Gregor
ed504fae7b
Converted to Unix format
...
[SVN r28432]
2005-04-23 02:59:05 +00:00
Fernando Cacciola
9a0013d668
Optional's Assignment fixed
...
[SVN r28412]
2005-04-22 13:28:34 +00:00
Fernando Cacciola
07a80c1b9b
In-place factories moved from /detail to /utility
...
New value_initalized tests added
[SVN r25313]
2004-09-21 14:54:32 +00:00
Fernando Cacciola
3db413cc30
Pseudo-destructor fixed (fix adjusted for BCB6)
...
[SVN r23632]
2004-07-16 14:42:25 +00:00
Fernando Cacciola
9aa4943b7a
Pseudo-destructor fixed
...
[SVN r23393]
2004-07-07 15:13:25 +00:00
Fernando Cacciola
7cacecb6f9
Pseudo-destructor fixed
...
[SVN r23392]
2004-07-07 15:04:52 +00:00
Fernando Cacciola
05045f5be7
Fixed overload resolution problem with operator= in bcc5.6.4
...
[SVN r21999]
2004-01-27 13:46:50 +00:00
Fernando Cacciola
c18e5d9464
Fixed bcc5.5.1
...
[SVN r20991]
2003-11-28 15:33:51 +00:00
Fernando Cacciola
d469aff043
Moved from "utility" to "detail" until a Fast Track Review formalizes it.
...
[SVN r20983]
2003-11-28 14:36:21 +00:00
Fernando Cacciola
f8fe66e289
Still mre bcc5.5.1 compat fixes
...
[SVN r20727]
2003-11-07 14:57:30 +00:00
Fernando Cacciola
6c70e16379
More bcc5.5.1 compatibility fixes.
...
[SVN r20671]
2003-11-05 00:03:23 +00:00
Fernando Cacciola
51975011a9
More compiler compatibility fixes. New License
...
[SVN r20608]
2003-11-03 03:02:06 +00:00
Fernando Cacciola
38c609e126
New License
...
[SVN r20607]
2003-11-03 02:59:08 +00:00
Fernando Cacciola
d0cf7efaf0
BCB551 and VC6 compatibility fixes
...
[SVN r20565]
2003-10-30 14:45:50 +00:00
Fernando Cacciola
65464ceffd
Reference semantics change rolledback (deffered to after 1.31.0)
...
[SVN r20557]
2003-10-30 00:39:34 +00:00
Fernando Cacciola
3468bfb07f
Compiler compatibility fixes; Reference assignment changed (if the lhs is initialized, the assignment goes to the referenced object, thus the reference is not rebound)
...
[SVN r20546]
2003-10-29 15:45:12 +00:00
Fernando Cacciola
b64b2cb0be
*** empty log message ***
...
[SVN r20511]
2003-10-28 00:09:18 +00:00
Fernando Cacciola
6b70058cf0
VC fixes for in-place constructor overloads, reference types are now assignable, none_t support added, compare_pointees.hpp factored out
...
[SVN r20510]
2003-10-28 00:03:17 +00:00
Fernando Cacciola
52896b097e
Typed in place construction added
...
[SVN r20070]
2003-09-15 20:28:10 +00:00
Fernando Cacciola
161540a0eb
Fixed access bug in type helpers
...
[SVN r20029]
2003-09-11 21:56:07 +00:00
Fernando Cacciola
a2f8c2fd41
Added functionality
...
[SVN r19994]
2003-09-10 15:39:30 +00:00
Jens Maurer
5a595a9a92
repair the previous GCC fix, now works on gcc 2.95, 3.0, and 3.3
...
[SVN r19686]
2003-08-18 18:51:55 +00:00
Jens Maurer
042d3e08b8
fix compilation guard for "using std::swap"
...
[SVN r19009]
2003-07-09 23:13:40 +00:00
Markus Schöpflin
0267424bfe
Added BOOST_DEDUCED_TYPENAME to fix compilation failures.
...
[SVN r17912]
2003-03-14 12:56:01 +00:00
Fernando Cacciola
1e7b26738e
Fixed alignment bug (::type missing)
...
[SVN r17890]
2003-03-13 12:54:53 +00:00
Fernando Cacciola
492f090b42
Small fix: test for m_initialized removed from operators -> and * (there is an assert anyway)
...
[SVN r17641]
2003-02-25 14:23:57 +00:00
Fernando Cacciola
196b8e7ea0
Additional portability fixes (for VC6.0,VC7.0 and Intel C++ 7.0)
...
[SVN r17082]
2003-01-29 19:48:43 +00:00
Fernando Cacciola
8068c1db25
GCC swap workaround added
...
[SVN r17065]
2003-01-28 15:18:50 +00:00
Fernando Cacciola
4456cc1660
MSVC templated constructor/assignment problem fixed.
...
[SVN r17062]
2003-01-28 14:38:00 +00:00
Fernando Cacciola
9461f09cb8
MSVC6.0 Fixes
...
[SVN r17049]
2003-01-27 13:54:57 +00:00
Fernando Cacciola
ea296efa2f
Jamfile added
...
[SVN r17009]
2003-01-23 16:29:30 +00:00
Fernando Cacciola
6277c98514
Initial versions
...
[SVN r16995]
2003-01-22 17:54:11 +00:00