From bca58bf3529a57c1805b44e70cb4b986c697383f Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 2 Jun 2019 11:10:23 +1000 Subject: [PATCH] array/parray: add empty query --- array/parray.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/array/parray.hpp b/array/parray.hpp index c468c4d4..a29a63d4 100644 --- a/array/parray.hpp +++ b/array/parray.hpp @@ -76,10 +76,12 @@ namespace cruft { const DataT* data (void) const; DataT* data (void); + SizeT size (void) const; + bool empty (void) const { return size () == 0; } private: - SizeT m_size; + SizeT m_size; DataT *m_data; };