ATLAS Offline Software
Loading...
Searching...
No Matches
IsUpdater.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
4 */
11
12
13#ifndef CXXUTILS_ISUPDATER_H
14#define CXXUTILS_ISUPDATER_H
15
16
17#include "CxxUtils/concepts.h"
18#include <memory>
19
20
21namespace CxxUtils {
22namespace detail {
23
24
50template <template <class> class UPDATER>
51concept IsUpdater = requires(UPDATER<int> x,
52 const typename UPDATER<int>::Context_t& ctx)
53{
54 typename UPDATER<int>::Context_t;
55 { x.get() } -> std::same_as<const int&>;
56 { x.update (std::make_unique<int>(0), ctx) };
57 { x.quiescent (ctx) };
58 { x.defaultContext() } -> std::convertible_to<typename UPDATER<int>::Context_t>;
59};
60
61
62} // namespace detail
63} // namespace CxxUtils
64
65
66#endif // not CXXUTILS_ISUPDATER_H
#define x
Concept check for Updater class used by concurrent classes.
Definition IsUpdater.h:51
A couple standard-library related concepts.