We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a19ee5b commit 9e872dbCopy full SHA for 9e872db
1 file changed
include/bitcoin/system/types.hpp
@@ -294,7 +294,16 @@ constexpr type& operator=(Alternative&& alternative) NOEXCEPT \
294
{ \
295
inner.template emplace<Alternative>(std::forward<Alternative>(alternative)); \
296
return *this; \
297
-}
+}
298
+
299
+/// Generate operator= overloads forwarding assignment for a specific alt type.
300
+#define ALTERNATIVE_VARIANT_ASSIGNMENT(type, Alternative, inner) \
301
+FORWARD_ALTERNATIVE_VARIANT_ASSIGNMENT(type, Alternative, inner) \
302
+constexpr type& operator=(const Alternative& alternative) NOEXCEPT \
303
+{ \
304
+ inner = alternative; \
305
+ return *this; \
306
307
308
/// Argument placeholders.
309
/// ---------------------------------------------------------------------------
0 commit comments