Commit Graph

72 Commits

Author SHA1 Message Date
Peter Dimov
204bcce9df Make relational operators constexpr; add test/variant_eq_ne_cx.cpp 2019-03-06 00:26:55 +02:00
Peter Dimov
e5e09c1c04 Only use mp_invoke_q on mp11 1.70 and above 2019-03-05 01:14:09 +02:00
Peter Dimov
fdfe9df167 Do not trivially copy/move assign when not trivially copy/move constructible 2019-03-03 05:14:51 +02:00
Peter Dimov
30d974d0fc Fix exception safety issue in copy/move/converting constructor 2019-02-26 15:12:37 +02:00
Peter Dimov
f4d852e5ab Define detail::unsafe_get, use it in visit 2019-02-22 03:21:56 +02:00
Peter Dimov
a0b499bc3b Use copy_cv_ref in apply_cv_ref instead of variant_alternative_t 2019-02-22 01:57:09 +02:00
Peter Dimov
c1287f9e95 Fix variant_alternative for g++ 4.8 2019-02-21 23:06:24 +02:00
Peter Dimov
34933c35bd Use variant_alternative_t directly for references 2019-02-21 22:42:21 +02:00
Peter Dimov
d8cd270268 Add reference specializations to variant_alternative 2019-02-21 22:22:07 +02:00
Peter Dimov
87a2e88edb Use variant_size directly with references 2019-02-21 22:03:56 +02:00
Peter Dimov
cf3ea64b45 Add reference specializations to variant_size 2019-02-21 21:57:39 +02:00
Peter Dimov
f67a6bd2ae Remove variant2:: qualifications, detail is no longer ambiguous 2019-02-21 21:40:06 +02:00
Peter Dimov
f3e101a841 Remove using namespace boost::mp11 2019-02-21 20:37:20 +02:00
Peter Dimov
24fae0f542 Fix SFINAE conditions on emplace<U> 2019-02-18 20:40:17 +02:00
Peter Dimov
8f2ef7ddc1 Fix line indent 2019-02-18 20:00:02 +02:00
Peter Dimov
58709c2922 Change mp_invoke to mp_invoke_q 2019-02-18 19:58:20 +02:00
Peter Dimov
d1acc969f7 More g++ 4.8 fixes, const&& doesn't work well 2018-10-18 18:51:19 +03:00
Peter Dimov
24d7f83403 Rewrite variant_alternative for g++ 4.8 2018-10-18 18:33:22 +03:00
Peter Dimov
c6f441f9f2 Finish C++11 port 2018-10-18 08:41:37 +03:00
Peter Dimov
4878a5b87c Enable msvc-14.0 2018-10-18 07:43:50 +03:00
Peter Dimov
9b9c5b2e74 Fix msvc-14.1 regression 2018-10-18 07:28:39 +03:00
Peter Dimov
90cc6b7374 Port to C++11 2018-10-18 07:19:45 +03:00
Peter Dimov
46ee0af110 Remove valueless; monostate is enough 2018-10-18 03:32:57 +03:00
Peter Dimov
19d48d9d8b Fix .travis.yml; update MSVC workarounds 2018-10-18 00:43:01 +03:00
Peter Dimov
4de9f80487 Require valueless to be first, add test 2017-06-14 01:04:36 +03:00
Peter Dimov
236193114c Add monostate, valueless; opt-into single-buffer is now 'valueless', not arbitrary nothrow default constructible 2017-06-13 21:48:14 +03:00
Peter Dimov
3bb14bf93b Add emulations for is_trivially_* traits for libstdc++ < 5 2017-06-09 17:45:36 +03:00
Peter Dimov
82104cd55e constexpr the copy/move constructors; change copy/move assign to not require constexpr lambdas 2017-06-09 17:24:23 +03:00
Peter Dimov
ca0e58f3fc is_trivially_copyable doesn't exist on 4.9 either 2017-06-09 04:49:44 +03:00
Peter Dimov
3a198b5f2b Use is_trivially_copyable instead of has_trivial_copy_* 2017-06-09 04:31:59 +03:00
Peter Dimov
3c18ded3aa Check is_move_constructible, is_move_assignable 2017-06-09 04:17:06 +03:00
Peter Dimov
7c00db0600 has_trivial_move doesn't exist either in libstd++ pre-5 2017-06-09 03:44:02 +03:00
Peter Dimov
893cd7c1e5 Add workaround for libstdc++ < 5 2017-06-09 03:22:31 +03:00
Peter Dimov
613d411396 Fix constexpr emplace on clang and msvc-14.1 2017-06-09 02:27:02 +03:00
Peter Dimov
0997734e5c Make emplace constexpr 2017-06-09 02:05:34 +03:00
Peter Dimov
e68ff1f014 Fix copy/paste mistake 2017-06-04 13:55:42 +03:00
Peter Dimov
d88ba98e92 Throw bad_expected_access if throw_on_unexpected returns 2017-06-03 15:51:28 +03:00
Peter Dimov
02ecef4fcb Add const on remap_errors() 2017-06-03 14:58:44 +03:00
Peter Dimov
369781b623 Add test/variant_subset 2017-06-03 00:27:52 +03:00
Peter Dimov
8765ee1983 Add expected::operator>> as an alias for .then 2017-06-03 00:12:01 +03:00
Peter Dimov
e347ecbff1 Simplify bad_expected_access<E> a bit 2017-06-02 23:28:51 +03:00
Peter Dimov
bdd449ae6a get_if should return 0 when passed 0 2017-06-02 22:11:29 +03:00
Peter Dimov
c867329bb8 Rename mp_for_index to mp_with_index in expected.hpp, too 2017-06-02 18:27:08 +03:00
Peter Dimov
9b3121fac0 Rename mp_for_index to mp_with_index 2017-06-02 18:25:11 +03:00
Peter Dimov
0b387f5116 Add .then 2017-06-02 18:11:43 +03:00
Peter Dimov
3d2a3cb3eb Redesign bad_expected_access 2017-06-02 15:59:43 +03:00
Peter Dimov
d55db1dbc6 Replace use of get<> with ._get_impl for better codegen 2017-06-02 06:02:50 +03:00
Peter Dimov
c99bf2205c Move index() into variant_base to avoid needless ix_ >= 0 checks when single buffered 2017-06-02 05:41:13 +03:00
Peter Dimov
2a6c157fcc Add preliminary expected<T, E...> implementation 2017-06-02 05:15:51 +03:00
Peter Dimov
f4f949fc2f Add converting constructors, subset<U...>() 2017-06-02 05:14:40 +03:00