@@ -68,6 +68,7 @@ class Generator {
68
68
};
69
69
70
70
template <typename OpType, typename ... Args>
71
+ requires (requires { OpType (declval<Args>()...); })
71
72
void emit (Args&&... args)
72
73
{
73
74
VERIFY (!is_current_block_terminated ());
@@ -81,6 +82,7 @@ class Generator {
81
82
}
82
83
83
84
template <typename OpType, typename ExtraSlotType, typename ... Args>
85
+ requires (requires { OpType (declval<Args>()...); })
84
86
void emit_with_extra_slots (size_t extra_slot_count, Args&&... args)
85
87
{
86
88
VERIFY (!is_current_block_terminated ());
@@ -96,12 +98,14 @@ class Generator {
96
98
}
97
99
98
100
template <typename OpType, typename ... Args>
101
+ requires (requires { OpType (declval<Args>()...); })
99
102
void emit_with_extra_operand_slots (size_t extra_operand_slots, Args&&... args)
100
103
{
101
104
emit_with_extra_slots<OpType, Operand>(extra_operand_slots, forward<Args>(args)...);
102
105
}
103
106
104
107
template <typename OpType, typename ... Args>
108
+ requires (requires { OpType (declval<Args>()...); })
105
109
void emit_with_extra_value_slots (size_t extra_operand_slots, Args&&... args)
106
110
{
107
111
emit_with_extra_slots<OpType, Value>(extra_operand_slots, forward<Args>(args)...);
0 commit comments