The Difference Between Undefined Behavior and Ill-formed C++ Programs -- Raymond Chen
The C++ language has two large categories of “don’t do that” known as undefined behavior and ill-formed program. What’s the difference?
The Difference Between Undefined Behavior and Ill-formed C++ Programs
by Raymond Chen
From the article:
The C++ language has two large categories of “don’t do that” known as undefined behavior and ill-formed program. What’s the difference?
Undefined behavior (commonly abbreviated UB) is a runtime concept. If a program does something which the language specified as “a program isn’t allowed to do that”, then the behavior at runtime is undefined: The program is permitted by the standard to do anything it wants. Furthermore, the effect of undefined behavior can go backward in time and invalidate operations that occurred prior to the undefined behavior. It can do things like execute dead code. However, if your program avoids the code paths which trigger undefined behavior, then you are safe.

Working with the filesystem can be a daunting task, but it doesn’t have to be. In this post, I’ll walk you through some of the most common filesystem operations using the powerful features introduced in C++17, as well as some new enhancements in C++20/23. Whether you’re creating directories, copying files, or managing permissions, these examples will help you understand and efficiently utilize the 
Concurrency is a complicated topic. Lucian Radu Teodorescu provides a simple theory of concurrency which is easy to reason about and apply.