summaryrefslogtreecommitdiff
path: root/AK/Iterator.h
AgeCommit message (Collapse)Author
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-01-16AK: Explicitly name types in Iterator.hcreator1creeper1
In this particular case, auto is a footgun, because we are very certain about the type that we want to return. const-correctness could have been violated (as Vector did), because Iterator did not enforce that the returned pointer was actually const if the Iterator was an Iterator over a const container.
2021-06-08AK: Make Vector capable of holding reference typesAli Mohammad Pur
This commit makes it possible to instantiate `Vector<T&>` and use it to store references to `T` in a vector. All non-pointer observers are made to return the reference, and the pointer observers simply yield the underlying pointer. Note that the 'find_*' methods act on the values and not the pointers that are stored in the vector. This commit also makes errors in various vector methods much more readable by directly using requires-clauses on them. And finally, it should be noted that Vector cannot hold temporaries :^)
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-10AK+Everywhere: Make StdLibExtras templates less wrapper-yAnotherTest
This commit makes the user-facing StdLibExtras templates and utilities arguably more nice-looking by removing the need to reach into the wrapper structs generated by them to get the value/type needed. The C++ standard library had to invent `_v` and `_t` variants (likely because of backwards compat), but we don't need to cater to any codebase except our own, so might as well have good things for free. :^)
2021-02-01AK: Make single pivot quick_sort guarantee a max stack depth of log(n)Mart G
- The change to quick_sort requires SimpleIterator to support assignment. - Rename quick_sort to single_pivot_quick_sort to make it easier to choose a specific implementation (not based on signature). - Ensure single_pivot_quick_sort does not copy the pivots - Expand sorts_without_copy test case to cover both single and dual pivot implementations.
2020-11-14AK: Mark SimpleIterator::operator*() as ALWAYS_INLINEAndreas Kling
This gives the compiler enough information to optimize index validation when using range-for to iterate over a Vector, drastically reducing the cost of such loops.
2020-09-08AK: Add generic SimpleIterator class to replace VectorIterator.asynts