27 template <
class... GetArgs,
class... SetArgs>
28 std::tuple<GetArgs...>
get_set_mutexed(std::mutex& mut, std::tuple<GetArgs&...> get, std::tuple<SetArgs...> from_set, std::tuple<SetArgs&...> to_set) {
30 std::scoped_lock lock(mut);
32 std::tuple<GetArgs...> result = get;
47 template <
class... Args>
48 std::tuple<Args...>
get_mutexed(std::mutex& mut, Args&... args) {
50 std::scoped_lock lock(mut);
52 std::tuple result = std::tuple(args...);
70 std::scoped_lock lock(mut);
97 template <
class T,
class... Args>
118 std::scoped_lock lock(mut);
139 template <
class... Args>
142 std::scoped_lock lock(mut);
146 return std::tuple(args...);
164 template <
class... Args>
165 auto set_mutexed(std::mutex& mut,
const std::tuple<Args...> from, std::tuple<Args&...> to) {
167 std::scoped_lock lock(mut);