C++ Digest #2 (August 21, 2023 – September 3, 2023)
Hello, Habre! Today I want to present to you a selection of interesting news and materials from the world of C++ for the past two weeks.
🇷🇺 Habr: Books on C++ that can be recommended to developers in 2023 – A selection of books from the pros, relevant for both beginners and experienced developers.
🇷🇺 Habr: Fast Binary Search Without Branching – Overview of the fastest (yet simple) binary search implementation in C++.
🇷🇺 Habr: Common Patterns of Typos in Programming – About seven of the most common typos in C, C++, C#, and Java code.
🇷🇺 Habr: Five modern initialization techniques in C++: From reserve() to piecewise_construct.
🇷🇺 Habr: PVS-Studio vs CodeLite: the battle for the perfect code – analysis of the results of checking the code base of CodeLite, a free cross-platform IDE for C++ and not only with PVS-Studio.
Bartlomiej Filipek: Is it possible to use Monadic Operations for std::optional in C++23 – Introducing new methods std::optional
: and_then
, transform
and or_else
which allow you to make the code more readable and get rid of a lot of boilerplate in it.
Sandor Dargo: C++23: compatibility with C – Overview of C++23 innovations adopted for C compatibility: new header file <stdatomic.h>
the possibility of defining labels at the end of component instructions
Raymond Chen: On writing loops in PPL and continuation-passing style (part 1, part 2, part 3, part 4) – Microsoft Parallel Patterns Library is entirely based on juggling callbacks, and there is no problem using them when it comes to sequential calculations. And if we need to iterate? How can we most elegantly implement this opportunity?
Raymond Chen: On how the control units differ std::shared_ptr
created in different ways: on the basis of an already existing index, with the help of std::make_shared
, std::allocate_shared
.
Martin HoÅ™eňovský: The Little Things: The Missing Performance in std::vector – Overview of a simple improvement std::vector
absent in the standard, but capable in many cases of increasing the productivity of inserting new elements into it up to 5 times.
Jonathan Müller: Compile-time sizes for range adapters — On the use of idioms static constexpr std::integral_constant
for range adapters.
Shafik Yaghmour: Auto Auto Auto – Detailed analysis of the puzzle, is the following type correct: auto() -> auto(*)() -> auto(*)() -> int
.
Demofox: Inverting Gauss’ Formula — Application of the inverted formula for finding the sum of consecutive numbers from 1 to N to solving graph problems.
Demofox: Permutation Iteration and Random Access – Analysis of algorithms for finding a string based on its lexicographic rank among all permutations and, conversely, finding the lexicographic rank of a string.
NVIDIA DevBlog: Accelerated Encrypted Execution of General Purpose Applications – A small overview of ArctyrEX, a framework for distributed homomorphic computing, but still freely available.
NVIDIA DevBlog: Simplifying GPU Application Development with Heterogeneous Memory Management – Overview of HMM, a CUDA 12.2 innovation that enables seamless host-to-host data exchange (CPU) and accelerating devices (GPU) and that makes writing code much easier.
Timur Doumler: What is Low Latency C++? (Part 1, Part 2) – C++ is often said to be an excellent language for low-latency systems such as finance, audio processing, and gaming. But what exactly do we mean by “low latency,” how does that differ from “high performance,” and what makes C++ a great language for it?
– About implementation and optimization of calendar algorithms in libstdc++.
Luke Valenty: Composition on Tiny Embedded Systems in C++ — About a modern approach to the development of embedded systems in C++.
— Everyone always talks about monads and functors, but applicative functors, despite the fact that they are often extremely useful, are almost never mentioned. Although most of the time when we think of a “monadic interface” what we really need is an “application interface”. This talk aims to remedy that by highlighting application functors in all their glory.
Chandler Carruth, Josh Levenberg, Richard Smith: Definition-Checked Generics (Part 1, Part 2) – An Introduction to Definition-Checked Generic Programming: An Attempt to Introduce It in C++0x; how it relates to the concepts we have in C++20 and what advantages it provides.
Hans de Nivelle: Trees for Logic and Parsing in C++ — About a modern approach to the implementation of formal logic (in particular, syntactic abstract trees) on the pros.
– An overview of how exceptions work and when they should and should not be used.
Steve Downey: Using the C++ Sender/Receiver Framework: Implement Control Flow for Async Processing
Andreas Weis: Safety-First: C++ Safety-Critical Software
Bill Hoffman: State of C++20 modules in CMake
Spotted an error or typo? Report in private message (telegram, habr)
You can send the link through the form or by simply writing to me in private messages (telegram, habr)