We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
std::iterator
cmdline.h
1 parent 6475b3c commit d1c3cb9Copy full SHA for d1c3cb9
src/util/cmdline.h
@@ -105,8 +105,15 @@ class cmdlinet
105
{
106
explicit option_namest(const cmdlinet &command_line);
107
struct option_names_iteratort
108
- : public std::iterator<std::forward_iterator_tag, std::string>
109
+ // These types are defined such that the class is compatible with being
110
+ // treated as an STL iterator. For this to work, they must not be renamed.
111
+ using iterator_category = std::forward_iterator_tag;
112
+ using value_type = std::string;
113
+ using difference_type = std::ptrdiff_t;
114
+ using pointer = std::string *;
115
+ using reference = std::string &;
116
+
117
option_names_iteratort() = default;
118
explicit option_names_iteratort(
119
const cmdlinet *command_line,
0 commit comments