- boost::string_ref requires Boost >= 1.53.0, which we don't have
in EL6, fall back to a plain std::string (alloc + copy) there ;
- boost::string_view::at() is broken for modern compilers before
1.64.0, so let's use boost::string_ref instead in that case.
using std::string_view;
#else
#include <boost/version.hpp>
-#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 <boost/utility/string_view.hpp>
using boost::string_view;
-#else
+#elif BOOST_VERSION >= 105300
#include <boost/utility/string_ref.hpp>
using string_view = boost::string_ref;
+#else
+using string_view = std::string;
#endif
#endif