Commit Graph

101 Commits

Author SHA1 Message Date
Peter Dimov
a3d35e61fe g++ 4.7 doesn't have std::is_trivially_destructible 2021-01-13 04:51:27 +02:00
Peter Dimov
5586ebaa64 Add support for visit<R> 2020-06-03 17:00:13 +03:00
Peter Dimov
84ea994325 Add specialization for variant_storage_impl<mp_false, ...> 2020-05-09 19:56:27 +03:00
Peter Dimov
465e5bac3d Add specialization for variant_storage_impl<mp_true, ...> to reduce instantiations 2020-05-09 18:14:12 +03:00
Peter Dimov
772ef0d312 Support derived types in visit 2020-05-06 20:11:03 +03:00
Peter Dimov
4b60dee4b6 Avoid gcc warning 'base class should be explicitly initialized in copy constructor' 2020-02-01 01:18:40 +02:00
Peter Dimov
972280e59f Remove commented-out variant_copy_base 2020-01-23 01:08:32 +02:00
Peter Dimov
ef2ef292b9 The msvc-14.0 workarounds are no longer needed 2020-01-22 20:14:11 +02:00
Peter Dimov
3b2fb1a48a Split variant_copy_base into separate cc/ca/mc/ma bases; avoids multiple inheritance, which is a penalty in the MS ABI 2020-01-22 19:59:59 +02:00
Peter Dimov
4f81882bfd Explicitly disable move constructor when needed 2020-01-22 18:30:36 +02:00
Peter Dimov
17bc06b090 Apply msvc-14.0 workarounds 2020-01-22 17:38:45 +02:00
Peter Dimov
c4cad3e96a Use an intermediate trivial base for trivial variants 2020-01-22 17:09:15 +02:00
Peter Dimov
a795f9cf01 Add missing inline 2020-01-11 06:41:21 +02:00
Peter Dimov
1f05cdfb17 Include <functional>, for g++ trunk (10.0) 2020-01-11 06:06:54 +02:00
Peter Dimov
b3229d48b7 gcc < 7 doesn't like specializing std::hash in a different namespace 2020-01-11 05:27:57 +02:00
Peter Dimov
fece11142c Add hashing support 2020-01-11 04:51:30 +02:00
Peter Dimov
f5d9662946 Support -fno-exceptions 2019-06-03 02:46:59 +03:00
Peter Dimov
adeb970be6 Introduce detail::throw_bad_variant_access 2019-06-03 01:05:15 +03:00
Peter Dimov
2d990f774a Remove _real_index 2019-05-12 19:34:21 +03:00
Peter Dimov
3041fff85c Remove expected 2019-05-12 18:56:54 +03:00
Peter Dimov
7f7c74522b Strong guarantee on assignment 2019-05-12 01:46:55 +03:00
Peter Dimov
c3f9beaadc Strong guarantee on emplace 2019-05-12 00:38:21 +03:00
Peter Dimov
70fbd17be9 Change A... to A&&... in is_constructible invocations 2019-04-09 21:14:13 +03:00
Peter Dimov
e8e56139a8 Update msvc workarounds for msvc-14.2 2019-04-09 20:17:28 +03:00
Peter Dimov
2d6385031e Fix emplace for types with a deleted move constructor (in the not trivially destructible case) 2019-04-09 19:22:04 +03:00
Peter Dimov
9f7e525984 Fix emplace for types with a deleted move constructor (in the trivially destructible case) 2019-04-09 18:28:18 +03:00
Peter Dimov
3808c9b122 Fix variant_npos warning 2019-03-25 17:40:39 +02:00
Peter Dimov
9875cfdc98 Add variant_npos and valueless_by_exception() 2019-03-25 16:17:06 +02:00
Peter Dimov
688849f9e8 Remove outcome.hpp and result.hpp 2019-03-25 16:16:10 +02:00
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