diff --git a/lmdb-safe.hh b/lmdb-safe.hh index ff28466..c34b542 100644 --- a/lmdb-safe.hh +++ b/lmdb-safe.hh @@ -14,7 +14,9 @@ #include // apple compiler somehow has string_view even in c++11! -#if __cplusplus < 201703L && !defined(__APPLE__) +#ifdef __cpp_lib_string_view +using std::string_view; +#else #include #if BOOST_VERSION > 105400 #include @@ -23,8 +25,6 @@ using boost::string_view; #include using string_view = boost::string_ref; #endif -#else // C++17 -using std::string_view; #endif