diff --git a/lix/libutil/sync.hh b/lix/libutil/sync.hh index 7b051801f..edce1820c 100644 --- a/lix/libutil/sync.hh +++ b/lix/libutil/sync.hh @@ -10,6 +10,7 @@ #include #include #include +#include namespace nix { @@ -44,6 +45,9 @@ public: Sync(const T & data) : data(data) { } Sync(T && data) noexcept : data(std::move(data)) { } + template + Sync(std::in_place_t, Args &&... args) : data(std::forward(args)...) { } + class Lock { protected: