diff --git a/rtb/datacache/any_str_ops.hpp b/rtb/datacache/any_str_ops.hpp index 4dd4a96..a7fce45 100644 --- a/rtb/datacache/any_str_ops.hpp +++ b/rtb/datacache/any_str_ops.hpp @@ -28,12 +28,13 @@ namespace boost { #endif #include +#include namespace ufw { /** * Functor for containers transparent across `std::string`, - * `boost::container::string`, `boost::string_view`, and `char const*`. + * `boost::container::string`, `boost::string_view`, `std::string_view` and `char const*`. */ template struct any_str_op { @@ -48,11 +49,13 @@ namespace ufw { using shm_str_t = typename boost::container::basic_string; using std_str_t = std::basic_string>; using str_view_t = boost::basic_string_view; + using std_str_view_t = std::basic_string_view; static str_view_t view(char_t const* x) { return {x}; } static str_view_t view(shm_str_t const& x) { return {x.data(), x.size()}; } static str_view_t view(std_str_t const& x) { return {x}; } static str_view_t view(str_view_t x) { return x; } + static str_view_t view(std_str_view_t const& x) { return {x.data(), x.size()}; } }; template