Skip to content

Commit 1519a02

Browse files
committed
Update FORWARD_VARIANT_CONSTRUCT() for non-optional inner.
1 parent ec29833 commit 1519a02

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/bitcoin/system/types.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ template<class... Overload> overload(Overload...) -> overload<Overload...>;
216216
/// Declare on struct to define constructors that forward to an inner variant.
217217
#define FORWARD_VARIANT_CONSTRUCT(type, inner) \
218218
template <class Type, class... Args> \
219-
constexpr type(std::in_place_type_t<Type >, Args&&... args) NOEXCEPT \
219+
constexpr type(std::in_place_type_t<Type>, Args&&... args) NOEXCEPT \
220220
: inner(std::in_place_type<Type>, std::forward<Args>(args)...) \
221221
{ \
222222
} \
@@ -245,7 +245,7 @@ constexpr type& assign(std::in_place_index_t<Index>, Args&&... args) NOEXCEPT \
245245
#define FORWARD_ALTERNATIVE_VARIANT_ASSIGNMENT(type, Alternative, inner) \
246246
type& operator=(Alternative&& alternative) NOEXCEPT \
247247
{ \
248-
inner.emplace(std::forward<Alternative>(alternative)); \
248+
inner.emplace<Alternative>(std::forward<Alternative>(alternative)); \
249249
return *this; \
250250
}
251251

0 commit comments

Comments
 (0)