Skip to content

Commit

Permalink
Revert part of 4d9aa3b that currently breaks Zeek build
Browse files Browse the repository at this point in the history
  • Loading branch information
ckreibich committed Dec 6, 2024
1 parent 5c9f59f commit 5bcc42f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libbroker/broker/expected.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ public:

// -- constructors, destructors, and assignment operators --------------------

template <class U>
expected(U x, std::enable_if_t<std::is_convertible_v<U, T>>* = nullptr)
: engaged_(true) {
new (std::addressof(value_)) T(std::move(x));
}

expected(T&& x) noexcept(nothrow_move) : engaged_(true) {
new (std::addressof(value_)) T(std::move(x));
}
Expand Down

0 comments on commit 5bcc42f

Please sign in to comment.