M.5 — std::move_if_noexcept

(h/t to reader Koe for providing the first draft of this lesson!) In lesson , we covered the noexcept exception specifier and operator, which this lesson builds on. We also covered the strong exception guarantee, which guarantees that if a function is interrupted by an exception, no memory will be …

6.9 — Sharing global constants across multiple files (using inline variables)

In some applications, certain symbolic constants may need to be used throughout your code (not just in one location). These can include physics or mathematical constants that don’t change (e.g. pi or Avogadro’s number), or application-specific “tuning” values (e.g. friction or gravity coefficients). Instead of redefining these constants in every …