Andrzej Krzemieński
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
Andrzej Krzemienski
c653372524
cleanup after separating references
2016-02-18 00:24:59 +01:00
Andrzej Krzemienski
87ef503606
Removed empty optional destructor
2016-02-17 16:39:07 +01:00
Andrzej Krzemienski
94c735af2d
added optional ref swap
...
and also chaned the copyright year in docs
2016-02-13 15:33:07 +01:00
Andrzej Krzemienski
b5b8414c06
Primary template optional<> does not handle references
2016-02-13 00:46:41 +01:00
Andrzej Krzemieński
0a228e74fe
Config: NO_PROPER_CONVERT in older GCC
2015-10-24 22:45:00 +02:00
Andrzej Krzemieński
4b3077dea3
config: if for intel
2015-10-20 23:42:03 +02:00
Andrzej Krzemieński
7396e4051b
config: fixed bad name
2015-10-20 16:02:04 +02:00
Andrzej Krzemieński
b96337a6d7
no intel detection
2015-10-20 09:21:02 +02:00
Andrzej Krzemieński
74bd6444db
config: excluding intel
2015-10-19 10:21:54 +02:00
Andrzej Krzemieński
472a94d371
CFG: handling C++03 compilers
2015-10-15 08:48:34 +02:00
Andrzej Krzemienski
fb1cf2581e
Config: detect ref convert bug in gcc 4.4 and 4.5
2015-10-14 23:11:33 +02:00
Andrzej Krzemieński
29975d6192
Config: improved NO_PROPER_CONVERT
2015-10-13 10:47:26 +02:00
Andrzej Krzemieński
6375fccf27
NO_PROPER_CONVERT_FROM_CONST_INT macro
2015-10-10 15:23:38 +02:00
Andrzej Krzemienski
0d5061aebe
experimental optional config test
2015-10-08 18:54:21 +02:00
Jürgen Hunold
bc91cac244
Add newline at EOF
2015-10-07 09:02:13 +02:00
Andrzej Krzemieński
fb1edf51e8
value_or_eval fix
2015-10-06 12:39:02 +02:00
Andrzej Krzemieński
4939613070
added missing ifdef
2015-10-06 09:17:14 +02:00
Andrzej Krzemienski
b0d7786e14
bug fixes
2015-10-06 00:33:14 +02:00
Andrzej Krzemienski
e7cab0e233
fixed digraphs in optional refs
2015-10-05 23:50:11 +02:00
Andrzej Krzemienski
cf4b2e8b16
specialization for optional ref - preliminary
2015-10-05 16:54:05 +02:00
Andrzej Krzemienski
9f8dd57386
boost::none - simpler and works with MSVC
2015-10-02 09:00:57 +02:00
Andrzej Krzemienski
b43ce289c2
Fixed no-return warning
2015-06-03 18:22:41 +02:00
Andrzej Krzemienski
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
Andrzej Krzemienski
8ca74951b0
Added emplace(void) for older compilers
2015-05-15 18:10:19 +02:00
drivehappy
1d7fe0e770
Removed unused parameters.
2015-04-21 14:37:41 -07:00
Andrzej Krzemienski
15d9fcdbd1
added missing overload for value_or fo non-C++11 compilers
2015-03-10 07:14:36 +01:00
Andrzej Krzemienski
6e40825098
described headers in docs; added move in operator>>
2015-03-09 21:56:25 +01:00
Andrzej Krzemienski
0a8a798c3a
Fixed Trac #10839
2015-03-09 11:50:10 +01:00
Andrzej Krzemienski
59266a2630
More restrictive assignment from optional<U>
2015-03-06 19:20:45 +01:00
Andrzej Krzemienski
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
Andrzej Krzemienski
726b227aa9
operator<< improvements
2015-01-21 00:10:51 +01:00
Andrzej Krzemienski
0d06d66f5c
Improvement to "cout << none" implementation
2014-11-24 22:53:59 +01:00
Jürgen Hunold
1d3446304b
Add operator<< for boost::none
2014-11-24 15:38:24 +01:00
Andrzej Krzemienski
53e53171c4
none_t is no loner constructible from literal 0
...
This caused problems because:
optional<T> o = 0;
always worked. But often it would create an uninitialized optional.
2014-11-22 01:18:25 +01:00
Kazutoshi SATODA
d4a4cdca1d
Supply <string> to fix C++03 compile error on logic_error("...")
...
This change makes the library usable (again) on C++03 standard library
implementations where <stdexcept> doesn't imply inclusion of <string>,
e.g. STLport.
2014-08-28 02:45:14 +09:00
Andrzej Krzemienski
fea4882f24
rvalue ref overloads do not return by value
2014-07-10 13:49:36 +02:00
Andrzej Krzemienski
18b8c4bb18
Catching up with N4078
2014-06-28 00:31:36 +02:00
Andrzej Krzemienski
4cbb67e505
Cleaner handling of explicit U to T conversions
2014-06-20 11:38:57 +02:00
Andrzej Krzemienski
d70114b3dc
Added func value_or_eval()
2014-06-18 16:42:48 +02:00
Andrzej Krzemienski
0a2a8957fa
bug fix: comma in BOOST_STATIC_ASSERT
2014-06-15 21:51:07 +02:00
Andrzej Krzemienski
31c9119266
value_or() requires that U is convertible to T
...
Due to Vladimir Batov.
2014-06-14 22:49:37 +02:00
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