From ebccad6fa63b829955e02cf4dcd2a6c700b4045a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 14 Mar 2018 20:44:53 +0000 Subject: Add documentation for MemMap::sv() --- libadhocutil/fileUtils.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libadhocutil/fileUtils.h b/libadhocutil/fileUtils.h index 56ece22..9cc73cb 100644 --- a/libadhocutil/fileUtils.h +++ b/libadhocutil/fileUtils.h @@ -151,9 +151,11 @@ namespace AdHoc { /// The file data. void * const data; + /** + * Create a std::string_view of the mapped data. + */ template - auto - sv() const + auto sv() const { return std::basic_string_view((const T *)data, st.st_size / sizeof(T)); } -- cgit v1.2.3