listings-Chap25-README.md
Listings of Chap25.docx
This is linked summary of the listings. You can also view it on one page.
- Listing 25.1: Something is done with the input vector—but what?
- Book: lst-0001-book.cpp
- Godbolt: lst-0001-godb.cpp, https://godbolt.org/z/jcWvThn3a
- Listing 25.2: This input vector will be sorted!
- Book: lst-0002-book.cpp
- Godbolt: lst-0002-godb.cpp, https://godbolt.org/z/EjT7nPPv7
- Listing 25.3: Composing functions
- Book: lst-0003-book.cpp
- Godbolt: lst-0003-godb.cpp, https://godbolt.org/z/9xrP8Ehvd
- Listing 25.4: Algorithms run in parallel.
- Book: lst-0004-book.cpp
- Godbolt: lst-0004-godb.cpp, https://godbolt.org/z/Koxoha5bx
- Listing 25.5: View types and their adapters.
- Book: lst-0005-book.cpp
- Godbolt: lst-0005-godb.cpp, https://godbolt.org/z/rrq1v5qPs
- Listing 25.6: Especially the C++23 views can be well combined.
- Book: lst-0006-book.cpp
- Godbolt: lst-0006-godb.cpp, https://godbolt.org/z/hYTv6f9eo
- Listing 25.7: Functions must receive a range parameter as a universal reference.
- Book: lst-0009-book.cpp
- Godbolt: lst-0009-godb.cpp, https://godbolt.org/z/3EbsPczh1
- Listing 25.8: A function only for views and not for containers.
- Book: lst-0010-book.cpp
- Godbolt: lst-0010-godb.cpp, https://godbolt.org/z/s1GjfWxv6
- Listing 25.9: Searching with a predicate.
- Book: lst-0011-book.cpp
- Godbolt: lst-0011-godb.cpp, https://godbolt.org/z/W9n7sTovz
- Listing 25.10: Recognizing a palindrome with a single line of code.
- Book: lst-0012-book.cpp
- Godbolt: lst-0012-godb.cpp, https://godbolt.org/z/MKxnGdrbr
- Listing 25.11: Even “read-only” algorithms like “for_each” can modify elements.
- Book: lst-0013-book.cpp
- Godbolt: lst-0013-godb.cpp, https://godbolt.org/z/jz1Gqo7d9
- Listing 25.12: “transform” can juggle with different types.
- Book: lst-0015-book.cpp
- Godbolt: lst-0015-godb.cpp, https://godbolt.org/z/7r4b8jdGr
- Listing 25.13: Transforming with range adapters.
- Book: lst-0016-book.cpp
- Godbolt: lst-0016-godb.cpp, https://godbolt.org/z/j9ozax8qE
- GodboltId:s53qx664K
- Book: lst-0017-book.cpp
- Godbolt: lst-0017-godb.cpp, https://godbolt.org/z/s53qx664K
- Listing 25.14: Functionality of the set algorithms.
- Book: lst-0018-book.cpp
- Godbolt: lst-0018-godb.cpp, https://godbolt.org/z/1esod6hrT
- GodboltId:j6GPKc36P
- Book: lst-0019-book.cpp
- Godbolt: lst-0019-godb.cpp, https://godbolt.org/z/j6GPKc36P
- Listing 25.15: “accumulate” example.
- Book: lst-0020-book.cpp
- Godbolt: lst-0020-godb.cpp, https://godbolt.org/z/Y7GPcqWM8
- Listing 25.16: “adjacent_difference” and “pairwise_transform”.
- Book: lst-0021-book.cpp
- Godbolt: lst-0021-godb.cpp, https://godbolt.org/z/5Whz59374
- Listing 25.17: “iota”, “stride”, and “take”
- Book: lst-0022-book.cpp
- Godbolt: lst-0022-godb.cpp, https://godbolt.org/z/WPrP79sv6
- Listing 25.18: “inclusive_scan” and “exclusive_scan”.
- Book: lst-0023-book.cpp
- Godbolt: lst-0023-godb.cpp, https://godbolt.org/z/enj3znvTs
- GodboltId:dKPbjj1f8
- Book: lst-0024-book.cpp
- Godbolt: lst-0024-godb.cpp, https://godbolt.org/z/dKPbjj1f8
- Listing 26.19: A custom algorithm.
- Book: lst-0026-book.cpp
- Godbolt: lst-0026-godb.cpp, https://godbolt.org/z/n8ErWj7j6
- Listing 25.19: The use of adjacent_pair.
- Book: lst-0027-book.cpp
- Godbolt: lst-0027-godb.cpp, https://godbolt.org/z/91jj8Toqs
- Listing 25.20: Custom range adapters for views.
- Book: lst-0028-book.cpp
- Godbolt: lst-0028-godb.cpp, https://godbolt.org/z/e54xzT9dW