Remove deprecated iterator type (#381)
Fixes #379. `iterator` is deprecated in C++17.
This commit is contained in:
parent
1dcb44e79a
commit
e9d20c2c07
@ -143,11 +143,16 @@ toLocalString(std::string s)
|
||||
CXXOPTS_DIAGNOSTIC_PUSH
|
||||
CXXOPTS_IGNORE_WARNING("-Wnon-virtual-dtor")
|
||||
// This will be ignored under other compilers like LLVM clang.
|
||||
class UnicodeStringIterator : public
|
||||
std::iterator<std::forward_iterator_tag, int32_t>
|
||||
class UnicodeStringIterator
|
||||
{
|
||||
public:
|
||||
|
||||
using iterator_category = std::forward_iterator_tag;
|
||||
using value_type = int32_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
|
||||
UnicodeStringIterator(const icu::UnicodeString* string, int32_t pos)
|
||||
: s(string)
|
||||
, i(pos)
|
||||
|
@ -62,7 +62,7 @@ parse(int argc, const char* argv[])
|
||||
("tab-expansion", "Tab\texpansion")
|
||||
("int", "An integer", cxxopts::value<int>(), "N")
|
||||
("float", "A floating point number", cxxopts::value<float>())
|
||||
("vector", "A list of doubles", cxxopts::value<std::vector<double>>())
|
||||
("vector", "A list of doubles", cxxopts::value<std::vector<double>>()->default_value(""))
|
||||
("option_that_is_too_long_for_the_help", "A very long option")
|
||||
("l,list", "List all parsed arguments (including default values)")
|
||||
("range", "Use range-for to list arguments")
|
||||
|
Loading…
Reference in New Issue
Block a user