143 Commits

Author SHA1 Message Date
Peter Dimov
799a69eccc Disable -Wmaybe-uninitialized false positive. Refs #55. 2026-01-02 02:21:29 +02:00
Peter Dimov
936a1a95b5 msvc-14.5 still needs the workarounds. sad! 2026-01-01 18:15:20 +02:00
Peter Dimov
e708866c65 Add more constexpr. Refs #53. 2025-10-17 22:24:26 +03:00
Peter Dimov
df84f1f146 Work around Clang 3.x failures 2024-12-22 20:10:16 +02:00
Peter Dimov
2630b3e572 Use the smallest appropriate unsigned type for the index. Closes #50. 2024-12-22 19:09:05 +02:00
Peter Dimov
306a602d19 Compute the index type with a metafunction. Refs #50. 2024-12-21 19:01:18 +02:00
Andrey Semashev
47e544959f Added missing std namespace qualifiers. 2024-12-18 02:57:01 +03:00
Peter Dimov
9061e427c2 Add test/variant_visit_cx.cpp. Refs #47. 2024-11-23 03:13:28 +02:00
Peter Dimov
f5cd36af3d Update MSVC workaround 2024-07-21 22:55:40 +03:00
Peter Dimov
78796d0e7d Increase workaround to < 1950, because VS2022 has reached _MSC_VER=1940. Refs #43. 2024-05-17 21:44:21 +03:00
Peter Dimov
f0acc9326e Work around MSVC failures in variant_derived_construct2. Refs #43. 2024-03-24 19:16:09 +02:00
Jonathan Stein
55f1332ce0 Suppress -Wuninitialized in emplace_impl
Closes #38
2023-10-23 15:46:15 -05:00
Peter Dimov
db12c36b89 Remove unnecessary includes 2023-10-11 18:28:11 +03:00
Peter Dimov
a5cb0582d5 Make tag_invoke_L2 more msvc-14.0-friendly 2023-09-03 18:28:49 +03:00
Peter Dimov
26595285d3 Add variant<>::uses_double_storage(). Refs #37. 2023-06-28 22:14:56 +03:00
Peter Dimov
376925a209 Work around msvc-14.1 /permissive- failure 2022-10-24 15:47:09 +03:00
Peter Dimov
32862d6db7 Add missing std::move 2022-10-18 16:02:33 +03:00
Peter Dimov
423d350ff1 Remove unneeded forward declarations 2022-10-18 16:01:31 +03:00
Peter Dimov
aad1f86fae Reflect the change in is_null_like 2022-10-18 16:00:14 +03:00
Peter Dimov
1f8c4a1900 Replace polymorphic lambdas with function objects for C++11 2022-10-18 06:29:57 +03:00
Peter Dimov
67a12199e6 Add JSON support (refs #28) 2022-10-18 06:08:18 +03:00
Peter Dimov
457147d1b0 Suppress -Wmaybe-uninitialized in emplace_impl 2022-10-18 03:20:36 +03:00
Peter Dimov
5e2bce1baa Add operator<< for monostate 2022-01-31 17:55:26 +02:00
Peter Dimov
573ef77382 Move unsigned ix_ after the elements to avoid need to adjust rdi (closes #30) 2021-12-09 21:28:35 +02:00
Peter Dimov
3fc7540733 Only define operator<< when all contained types are streamable (refs #31) 2021-12-09 18:39:03 +02:00
Peter Dimov
2da13befd7 Work around mysterious errors with gcc, msvc-14.1, and clang-cl 2021-09-15 03:28:29 +03:00
Peter Dimov
e668c099ce Add operator<< for variant 2021-09-15 02:51:11 +03:00
Peter Dimov
8fd9f830a9 Add proper type deduction to visit_by_index 2021-09-15 01:30:09 +03:00
Peter Dimov
ad06c9b923 Add visit_by_index 2021-09-14 21:06:01 +03:00
Peter Dimov
1af7b165cf BOOST_VARIANT2_CX14_ASSERT must be empty under C++11 2021-09-11 18:22:46 +03:00
Peter Dimov
49bff72be0 Define and use a helper macro BOOST_VARIANT2_CX14_ASSERT in constexpr functions 2021-09-11 18:11:17 +03:00
Peter Dimov
59780ba08e Only assert when C++14 2021-09-11 18:00:29 +03:00
Peter Dimov
dce8174550 Make unsafe_get public 2021-09-11 17:29:21 +03:00
Peter Dimov
9d40bc80f1 Use BOOST_ASSERT instead of assert 2021-09-11 17:23:29 +03:00
Peter Dimov
be6ddf9fdc Add boost/variant2.hpp 2021-09-11 17:19:09 +03:00
Peter Dimov
3bc9a57c9b Merge branch 'feature/issue-26' into develop 2021-03-13 18:23:39 +02:00
Peter Dimov
3ca95a65df Use boost::hash in hash_value, not std::hash (closes #27) 2021-03-13 05:08:03 +02:00
Peter Dimov
a2dab8c7d3 Refactor detail::hash_value_L 2021-03-13 04:10:41 +02:00
Peter Dimov
90cda5339f Disable U&& constructor for derived types 2021-03-12 23:40:14 +02:00
Peter Dimov
fb3ce863ff Add MSVC workaround for monospace constexpr (refs #25) 2021-03-08 03:26:40 +02:00
Peter Dimov
3c9f4e56bf Fix visit codegen regression when NDEBUG is not defined 2021-01-24 17:27:24 +02:00
Peter Dimov
3015e56bcb GCC bug 63707 has been fixed for GCC 11 2021-01-23 20:36:12 +02:00
Peter Dimov
453b00dec8 Use (i+1)*2+j for the internal index in the double-buffered case, to avoid branches 2021-01-13 02:10:12 +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