MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / iterator

Class iterator

test/cfg/boost.cpp:214–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 static const int arity = 1;
213
214 struct iterator {
215 int operator*() const { return b; }
216 void operator++() {
217 a = a + b;
218 std::swap(a, b);
219 }
220 private:
221 int a = 1;
222 int b = 1; // b is the output
223 };
224
225 // size is infinite
226 bdata::size_t size() const { return bdata::BOOST_TEST_DS_INFINITE_SIZE; }

Callers 1

beginMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected