token: introduce Sealed::is_valid To go along with Capability::is_valid
diff --git a/sdk/include/token.h b/sdk/include/token.h index c25c04b..00111ec 100644 --- a/sdk/include/token.h +++ b/sdk/include/token.h
@@ -175,6 +175,13 @@ { return reinterpret_cast<T *>(sealedPointer); } + /** + * Return the tag of the underlying pointer + */ + bool is_valid() + { + return __builtin_cheri_tag_get(get()); + } }; /**