diff options
Diffstat (limited to 'asl/layout.hpp')
-rw-r--r-- | asl/layout.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/asl/layout.hpp b/asl/layout.hpp index 06fbe10..2295a1c 100644 --- a/asl/layout.hpp +++ b/asl/layout.hpp @@ -24,6 +24,12 @@ struct layout {
return layout{ size_of<T>, align_of<T> };
}
+
+ template<is_object T>
+ static constexpr layout array(isize_t size)
+ {
+ return layout{ size_of<T> * size, align_of<T> };
+ }
};
} // namespace asl
|