File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,13 @@ namespace boost {
28
28
#endif
29
29
30
30
#include < string>
31
+ #include < string_view>
31
32
32
33
namespace ufw {
33
34
34
35
/* *
35
36
* Functor for containers transparent across `std::string`,
36
- * `boost::container::string`, `boost::string_view`, and `char const*`.
37
+ * `boost::container::string`, `boost::string_view`, `std::string_view` and `char const*`.
37
38
*/
38
39
template <typename Alloc, typename Op>
39
40
struct any_str_op {
@@ -48,11 +49,13 @@ namespace ufw {
48
49
using shm_str_t = typename boost::container::basic_string<char_t , char_traits_t , Alloc>;
49
50
using std_str_t = std::basic_string<char_t , char_traits_t , std::allocator<char_t >>;
50
51
using str_view_t = boost::basic_string_view<char_t , char_traits_t >;
52
+ using std_str_view_t = std::basic_string_view<char_t , char_traits_t >;
51
53
52
54
static str_view_t view (char_t const * x) { return {x}; }
53
55
static str_view_t view (shm_str_t const & x) { return {x.data (), x.size ()}; }
54
56
static str_view_t view (std_str_t const & x) { return {x}; }
55
57
static str_view_t view (str_view_t x) { return x; }
58
+ static str_view_t view (std_str_view_t const & x) { return {x.data (), x.size ()}; }
56
59
};
57
60
58
61
template <typename Alloc>
You can’t perform that action at this time.
0 commit comments