1
0
Fork 0
mirror of https://github.com/KingDuckZ/incredis synced 2024-11-23 00:33:46 +00:00

Incredis currently uses boost's string view, not std's.

This commit is contained in:
King_DuckZ 2018-10-13 14:43:23 +01:00
parent c4f84622fe
commit dc3f817db5

View file

@ -20,6 +20,7 @@
#include <string>
#include <stdexcept>
#include <boost/utility/string_view.hpp>
#include "duckhandy/implem/int_conv.hpp"
namespace redis {
@ -69,8 +70,8 @@ namespace redis {
}
};
template <typename T>
struct IntConv<T, std::enable_if_t<std::is_integral_v<T>, std::string_view>> {
static T conv (const std::string_view& in) {
struct IntConv<T, std::enable_if_t<std::is_integral_v<T>, boost::string_view>> {
static T conv (const boost::string_view& in) {
return dhandy::ary_to_int<T, char, 10, AsciiTranslator>(in.data(), in.data() + in.size());
}
};