Update common.h

This commit is contained in:
blueloveTH 2024-05-13 16:50:56 +08:00
parent 8203ef465e
commit 7bfe8d4bbf

View File

@ -103,6 +103,7 @@ struct Type {
bool operator==(Type other) const { return this->index == other.index; }
bool operator!=(Type other) const { return this->index != other.index; }
constexpr operator int() const { return index; }
constexpr operator bool() const { return index != 0; }
};
#define PK_LAMBDA(x) ([](VM* vm, ArgsView args) { return x; })