File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -66,4 +66,42 @@ enum class validation_modet
66
66
} \
67
67
} while (0 )
68
68
69
+ template <typename T>
70
+ struct call_checkt
71
+ {
72
+ static_assert (std::is_base_of<irept, T>::value, " " );
73
+
74
+ void operator ()(const irept &irep, const validation_modet vm)
75
+ {
76
+ const T &s = static_cast <const T &>(irep);
77
+ s.check (vm);
78
+ }
79
+ };
80
+
81
+ template <typename T>
82
+ struct call_validatet
83
+ {
84
+ static_assert (std::is_base_of<irept, T>::value, " " );
85
+
86
+ void
87
+ operator ()(const irept &irep, const namespacet &ns, const validation_modet vm)
88
+ {
89
+ const T &s = static_cast <const T &>(irep);
90
+ s.validate (ns, vm);
91
+ }
92
+ };
93
+
94
+ template <typename T>
95
+ struct call_validate_fullt
96
+ {
97
+ static_assert (std::is_base_of<irept, T>::value, " " );
98
+
99
+ void
100
+ operator ()(const irept &irep, const namespacet &ns, const validation_modet vm)
101
+ {
102
+ const T &s = static_cast <const T &>(irep);
103
+ s.validate_full (ns, vm);
104
+ }
105
+ };
106
+
69
107
#endif /* CPROVER_UTIL_VALIDATE_H */
You can’t perform that action at this time.
0 commit comments