File tree Expand file tree Collapse file tree 1 file changed +6
-19
lines changed
src/solvers/smt2_incremental/ast Expand file tree Collapse file tree 1 file changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -153,28 +153,15 @@ class smt_function_application_termt : public smt_termt
153153 {
154154 };
155155
156- // / Overload for when \p functiont does not have indices.
157- template <class functiont >
158- static std::vector<smt_indext>
159- indices (const functiont &function, const std::false_type &has_indices)
160- {
161- return {};
162- }
163-
164- // / Overload for when \p functiont has indices member function.
165- template <class functiont >
166- static std::vector<smt_indext>
167- indices (const functiont &function, const std::true_type &has_indices)
168- {
169- return function.indices ();
170- }
171-
172- // / Returns `function.indices` if `functiont` has an `indices` member function
173- // / or returns an empty collection otherwise.
156+ // / Returns `function.indices()` if `functiont` has an `indices` member
157+ // / function or returns an empty collection otherwise.
174158 template <class functiont >
175159 static std::vector<smt_indext> indices (const functiont &function)
176160 {
177- return indices (function, has_indicest<functiont>{});
161+ if constexpr (has_indicest<functiont>::value)
162+ return function.indices ();
163+ else
164+ return {};
178165 }
179166
180167public:
You can’t perform that action at this time.
0 commit comments