summaryrefslogtreecommitdiff
path: root/src/analysis/lattice.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/lattice.h')
-rw-r--r--src/analysis/lattice.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/analysis/lattice.h b/src/analysis/lattice.h
index 8d2b22243..7865de20b 100644
--- a/src/analysis/lattice.h
+++ b/src/analysis/lattice.h
@@ -19,7 +19,7 @@
#if __cplusplus >= 202002L
#include <concepts>
-#endif
+#endif // __cplusplus >= 202002L
namespace wasm::analysis {
@@ -45,6 +45,7 @@ concept Lattice = requires(const L& lattice,
typename L::Element& elem) {
// Lattices must have elements.
typename L::Element;
+ requires std::copyable<typename L::Element>;
// We need to be able to get the bottom element.
{ lattice.getBottom() } noexcept -> std::same_as<typename L::Element>;
// Elements should be comparable. TODO: use <=> and std::three_way_comparable
@@ -57,7 +58,7 @@ concept Lattice = requires(const L& lattice,
{ elem.makeLeastUpperBound(constElem) } noexcept -> std::same_as<bool>;
};
-#else
+#else // __cplusplus >= 202002L
#define Lattice typename