diff options
-rw-r--r-- | include/sirit/sirit.h | 6 | ||||
-rw-r--r-- | src/stream.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/sirit/sirit.h b/include/sirit/sirit.h index 0a9fce9..dc3c567 100644 --- a/include/sirit/sirit.h +++ b/include/sirit/sirit.h @@ -256,6 +256,12 @@ public: */ Id OpPhi(Id result_type, std::span<const Id> operands); + template <typename... Ts> + requires(...&& std::is_convertible_v<Ts, Id>) Id + OpPhi(Id result_type, Ts&&... operands) { + return OpPhi(result_type, std::span<const Id>({operands...})); + } + /** * The SSA phi function. This instruction will be revisited when patching phi nodes. * diff --git a/src/stream.h b/src/stream.h index 42e2041..bf9e48a 100644 --- a/src/stream.h +++ b/src/stream.h @@ -7,11 +7,11 @@ #pragma once #include <bit> -#include <span> #include <cassert> #include <concepts> #include <cstddef> #include <functional> +#include <span> #include <string_view> #include <unordered_map> #include <variant> |