From: Remi Gacogne Date: Mon, 21 Sep 2020 07:11:07 +0000 (+0200) Subject: Sync string_view definition in lmdb-safe X-Git-Tag: auth-4.4.0-alpha1~18^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c3cc699901768276b6ece64753c9be5f9688fe8;p=thirdparty%2Fpdns.git Sync string_view definition in lmdb-safe While we do not actually care about string_view::at() in lmdb-safe, we need to keep the two in sync so the type aliases do not collide. Perhaps we should consider using pdns_string_view as an alias instead? --- diff --git a/ext/lmdb-safe/lmdb-safe.hh b/ext/lmdb-safe/lmdb-safe.hh index 16d150fa7d..89a85ece6f 100644 --- a/ext/lmdb-safe/lmdb-safe.hh +++ b/ext/lmdb-safe/lmdb-safe.hh @@ -16,12 +16,16 @@ using std::string_view; #else #include -#if BOOST_VERSION >= 106100 +#if BOOST_VERSION >= 106400 +// string_view already exists in 1.61.0 but string_view::at() is not usable with modern compilers, see: +// https://github.com/boostorg/utility/pull/26 #include using boost::string_view; -#else +#elif BOOST_VERSION >= 105300 #include using string_view = boost::string_ref; +#else +using string_view = std::string; #endif #endif