C++: add Class::isStandardLayout()

This commit is contained in:
Nick Rolfe
2018-09-18 14:22:03 +01:00
parent 440d64d0b8
commit e5b9dca312
2 changed files with 7 additions and 0 deletions

View File

@@ -418,6 +418,12 @@ class Class extends UserType {
*/
predicate isPOD() { is_pod_class(underlyingElement(this)) }
/**
* Holds if this class is a standard-layout class [N4140 9(7)]. Also holds
* for structs in C programs.
*/
predicate isStandardLayout() { is_standard_layout_class(underlyingElement(this)) }
/**
* Holds if this class is abstract, in other words whether it declares one
* or more pure virtual member functions.

View File

@@ -691,6 +691,7 @@ usertype_uuid(
);
is_pod_class(unique int id: @usertype ref);
is_standard_layout_class(unique int id: @usertype ref);
is_complete(unique int id: @usertype ref);