mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Fix incorrect initialization of unsafe_locker
List initialization of unsafe_locker class resulted in a compiler error, because 1) it had no constructor matching the arguments, and 2) it had user-declared constructors, so aggregate initialization was not allowed. This change fixes the issue by adding an appropriate constructor.
This commit is contained in:
parent
b51be39e71
commit
63e3ed4edc
@ -74,6 +74,13 @@ using condition_variable_t = std::condition_variable;
|
|||||||
|
|
||||||
template <typename Result>
|
template <typename Result>
|
||||||
struct unsafe_unlocker {
|
struct unsafe_unlocker {
|
||||||
|
explicit unsafe_unlocker(std::atomic_bool* ready, condition_variable_t* cv,
|
||||||
|
std::mutex* mutex, Result* result)
|
||||||
|
: ready_(ready)
|
||||||
|
, cv_(cv)
|
||||||
|
, mutex_(mutex)
|
||||||
|
, result_(result) {}
|
||||||
|
|
||||||
unsafe_unlocker(unsafe_unlocker const&) = delete;
|
unsafe_unlocker(unsafe_unlocker const&) = delete;
|
||||||
unsafe_unlocker(unsafe_unlocker&&) = default;
|
unsafe_unlocker(unsafe_unlocker&&) = default;
|
||||||
unsafe_unlocker& operator=(unsafe_unlocker const&) = delete;
|
unsafe_unlocker& operator=(unsafe_unlocker const&) = delete;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user