11#ifndef RANGE_TOKENIZER_H
12#define RANGE_TOKENIZER_H
65 std::string input, std::function<T(std::string
const&)>
convert = [](std::string
const& token) {T
value; std::istringstream(token) >>
value;
return value; })
67 std::istringstream
stream(input);
70 while (std::getline(
stream, token,
',')) {
71 if (std::is_integral<T>::value && token.find(
'-') != token.npos) {
73 if constexpr (std::is_integral<T>::value) {
80 return std::move(
res);
84 template <typename T, typename std::enable_if_t<std::is_integral<T>::value ==
true,
int> = 0>
87 std::istringstream tokenstream(token);
89 T lowerBound, upperBound;
90 if (std::getline(tokenstream, bound,
'-')) {
92 if (std::getline(tokenstream, bound,
'-')) {
GLsizei const GLfloat * value
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Tokenize a string according to delimiter ',' and extract values of type T.
static void insertRange(std::vector< T > &res, std::string token, std::function< T(std::string const &)> convert)
extract a range of an integral type from a token string and add to vector
static std::vector< T > tokenize(std::string input, std::function< T(std::string const &)> convert=[](std::string const &token) {T value;std::istringstream(token) > > value;return value;})
std::vector< uint64_t > convert(gsl::span< const uint64_t > page)