custom_iterator

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-11-10 00:00:00 +00:00
parent 304bf3dbe9
commit 95430c7c0c
2 changed files with 71 additions and 7 deletions

View File

@@ -20213,6 +20213,13 @@ Programs under link:userland/cpp/[] are examples of https://en.wikipedia.org/wik
*** link:userland/cpp/multimap.cpp[]: `std::multimap`
** <<algorithms>> contains a benchmark comparison of different c++ containers
[[cpp-standards]]
==== C++ standards
Like for C, you have to pay for the standards... insane. So we just use the closest free drafts instead.
https://stackoverflow.com/questions/81656/where-do-i-find-the-current-c-or-c-standard-documents
[[cpp-initialization-types]]
==== C++ initialization types
@@ -20470,13 +20477,6 @@ https://stackoverflow.com/questions/51031060/are-c17-parallel-algorithms-impleme
link:userland/cpp/parallel_sort.cpp[]
[[cpp-standards]]
==== C++ standards
Like for C, you have to pay for the standards... insane. So we just use the closest free drafts instead.
https://stackoverflow.com/questions/81656/where-do-i-find-the-current-c-or-c-standard-documents
[[cpp17]]
===== C++17 N4659 standards draft
@@ -20517,6 +20517,20 @@ Replaces decltype with type of an expression at compile time.
More powerful than `auto` as you can use it in more places.
[[cpp-concepts]]
==== C++ concepts
[[cpp-iterators]]
===== C++ iterators
https://stackoverflow.com/questions/37031805/preparation-for-stditerator-being-deprecated/38103394
link:userland/cpp/custom_iterator.cpp[]: there is no way to easily define a nice custom iterator, you just have to wrap existing iterators and add a gazillion wrapper methods:
* https://stackoverflow.com/questions/8054273/how-to-implement-an-stl-style-iterator-and-avoid-common-pitfalls
* https://stackoverflow.com/questions/3582608/how-to-correctly-implement-custom-iterators-and-const-iterators
* https://stackoverflow.com/questions/6471019/can-should-i-inherit-from-an-stl-iterator
=== POSIX
Programs under link:userland/posix/[] are examples of POSIX C programming.