Ultra
0.9.4
Loading...
Searching...
No Matches
src
kernel
evaluation_context.h
Go to the documentation of this file.
1
12
13
#if !defined(ULTRA_EVALUATION_CONTEXT_H)
14
#define ULTRA_EVALUATION_CONTEXT_H
15
16
#include <concepts>
17
18
namespace
ultra
19
{
20
27
enum class
[[nodiscard]]
evaluation_context
28
{
29
unchanged,
30
changed
31
};
32
36
template
<
class
E>
37
concept
ClearableEvaluator
=
38
requires
(E &eva)
39
{
40
{ eva.clear() } -> std::same_as<void>;
41
};
42
47
template
<
class
E>
48
void
invalidate_cache_if_supported
(E &eva)
49
{
50
if
constexpr
(
ClearableEvaluator<E>
)
51
eva.clear();
52
}
53
54
}
// namespace ultra
55
56
#endif
// include guard
ultra::ClearableEvaluator
Definition
evaluation_context.h:37
ultra
ultra::evaluation_context
evaluation_context
Definition
evaluation_context.h:28
ultra::invalidate_cache_if_supported
void invalidate_cache_if_supported(E &eva)
Definition
evaluation_context.h:48
Generated by
1.15.0