From 8f8adcfe381def71ee64641f249b00f3c21f4be6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 14 Mar 2018 21:35:22 +0000 Subject: Only expose string_view when it's available --- libadhocutil/fileUtils.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libadhocutil/fileUtils.h b/libadhocutil/fileUtils.h index 9cc73cb..f272ddd 100644 --- a/libadhocutil/fileUtils.h +++ b/libadhocutil/fileUtils.h @@ -151,6 +151,7 @@ namespace AdHoc { /// The file data. void * const data; +#ifdef __cpp_lib_string_view /** * Create a std::string_view of the mapped data. */ @@ -159,6 +160,7 @@ namespace AdHoc { { return std::basic_string_view((const T *)data, st.st_size / sizeof(T)); } +#endif private: DLL_PUBLIC void * setupMapInt(int flags) const; -- cgit v1.2.3