c0084a0451
extended speculative fix to more MSVC compilers
2016-02-20 16:11:16 +01:00
3b58b0f4da
speculative fix for msvc 8.0 test failure
2016-02-20 11:34:18 +01:00
f6e09fbf9c
value constructor is sfinae-friendly
2016-02-19 18:41:42 +01:00
5ffa3fd2f6
turned a complicatedcondition in enable_if into a metafun
2016-02-19 01:51:08 +01:00
1671966380
fixed preprocessor typeo
2016-02-18 15:02:07 +01:00
b38b64cee9
extended destructor workaround to MSVC 10.0
2016-02-18 12:34:08 +01:00
7ae2db7312
Conditionally removing optional destructor
2016-02-18 11:00:24 +01:00
630fbb7973
re-added explicit optional destructor
...
If it is not there T::~T() is never called in buggy msvc-8.0.
2016-02-18 09:16:59 +01:00
c653372524
cleanup after separating references
2016-02-18 00:24:59 +01:00
87ef503606
Removed empty optional destructor
2016-02-17 16:39:07 +01:00
b5b8414c06
Primary template optional<> does not handle references
2016-02-13 00:46:41 +01:00
cf4b2e8b16
specialization for optional ref - preliminary
2015-10-05 16:54:05 +02:00
b43ce289c2
Fixed no-return warning
2015-06-03 18:22:41 +02:00
4e7405a233
Sane swap() for rvalue-aware compilers
...
When we detect that compiler supports rvalue references, we implement swap() in term of moves (as intuition suggests).
Otherwise we fall back to old tricks with default constructor+swap
2015-05-18 16:51:12 +02:00
8ca74951b0
Added emplace(void) for older compilers
2015-05-15 18:10:19 +02:00
1d7fe0e770
Removed unused parameters.
2015-04-21 14:37:41 -07:00
15d9fcdbd1
added missing overload for value_or fo non-C++11 compilers
2015-03-10 07:14:36 +01:00
0a8a798c3a
Fixed Trac #10839
2015-03-09 11:50:10 +01:00
59266a2630
More restrictive assignment from optional<U>
2015-03-06 19:20:45 +01:00
f229257f30
You can now manually disable move semantics.
...
This may be useful in MSVC to work around a bug described in Trac #10399
2015-01-21 15:03:17 +01:00
726b227aa9
operator<< improvements
2015-01-21 00:10:51 +01:00
fea4882f24
rvalue ref overloads do not return by value
2014-07-10 13:49:36 +02:00
18b8c4bb18
Catching up with N4078
2014-06-28 00:31:36 +02:00
4cbb67e505
Cleaner handling of explicit U to T conversions
2014-06-20 11:38:57 +02:00
d70114b3dc
Added func value_or_eval()
2014-06-18 16:42:48 +02:00
0a2a8957fa
bug fix: comma in BOOST_STATIC_ASSERT
2014-06-15 21:51:07 +02:00
31c9119266
value_or() requires that U is convertible to T
...
Due to Vladimir Batov.
2014-06-14 22:49:37 +02:00
8fc2901fad
explicit operator bool becomes noexcept
2014-06-14 00:46:24 +02:00
fdc98d17ca
Added limited emplace() for older compilers
2014-06-06 23:24:43 +02:00
3dd614fd91
Reorganized docs. Minor code fix wrt opt refs
2014-06-04 18:13:06 +02:00
f99618f09b
Added ref-qualifiers to some accessors
2014-06-03 23:07:19 +02:00
2e583aaf30
Fixed code, updated docs, added emplace()
2014-06-03 17:36:18 +02:00
3984c9f9a1
Added function value_or()
2014-05-23 16:38:42 +02:00
75271b73a8
Member fun value() that throws on uninitialized
2014-05-22 23:32:49 +02:00
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
e9f5ed41be
binding to rvalues can be reenabled with a macro
2014-05-13 14:11:17 +02:00
f94846ccc5
Improved documentation. Added some noexcept.
2014-05-07 17:07:12 +02:00
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
86e759fb89
optional<const T&>::rval_reference_type is now T&& (not const T&)
2014-05-02 18:41:23 +02:00
897fdad11b
Changed incorrect types in static assertions guarding against binding temporaries to optional refs
2014-05-02 15:41:43 +02:00
c51f3e810b
The (in)equality comparison with boost::none does not require that T be EqualityComparable
2014-04-29 22:59:06 +02:00
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
c9f1422560
Updated documentation; fixed optional::swap
2014-04-29 01:06:14 +02:00
01b22a0ff0
Added tests for move conversion between optional<T> and optional<U>
2014-04-28 16:51:49 +02:00
3816143646
Disabled assignment and construction from rvalue references in optional<const T&>
2014-04-28 15:48:55 +02:00
0e61751fab
Added more tests for move operations, fixed bugs, disabled optional<T&&>.
2014-04-26 23:24:21 +02:00
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
5c69bac12f
Fixed unit tests (still need to add more unit tests for move semantics)
2014-04-26 00:22:39 +02:00
a26d11be87
Partially added move semantics (tests are still failing)
2014-04-22 22:36:19 +02:00
587ef8e988
Added 'raw' move semantics; no unit-tests
2014-04-14 23:44:34 +02:00