Tag: iterator
5 posts
-
C++ Custom Ranges
C++ custom ranges: satisfy std::ranges::range with begin/end, iterators, adaptors, sentinels, view_interface, pitfalls, and production patterns.
-
C++ Range-Based for: auto, References, and Temporaries
Range-based for in C++: auto vs auto& vs const auto&, proxy iterators, temporaries, C++17 structured bindings, custom begin/end, and production patterns.
-
Range-Based for Loop Errors in C++: Missing begin()/end() and Eight Other Pitfalls
Fix C++ range-for errors: "begin was not declared in this scope", const begin(), vector<bool> proxies, decayed arrays, map pair copies and dangling temporaries.
-
C++ sregex_iterator | Regex iterators for all matches
Use sregex_iterator and sregex_token_iterator to enumerate matches, split tokens, avoid dangling iterators, and handle empty matches and UTF-8 limits.
-
C++ Iterators: Categories, Operations, iterator_traits and Invalidation Bugs
C++ iterators explained: the five categories, iterator operations, iterator_traits, custom filter and transform iterators, and bugs like dereferencing end().