Meeting 115 (22 October 2020)

r/cpp status update

Reddit

WHAT.

Book: C++ Best Practices by Jason Turner

LeanPub (min. $9.99)

id Tech – Game engines written in C++

Engines and games

Fabien Sanglard’s game engine code reviews

See also

Doom Eternal study

Should I use C++ exceptions?

Reddit

TL;DR: Yes.

6 Efficient Things You Can Do to Refactor a C++ Project

B. Filipek

  1. Update the Compiler and Set Correct C++ Standard Conformance
  2. Fix Code With Deprecated or Removed C++ Features
  3. Start Adding Unit Tests
  4. Decouple or Extract Classes
  5. Extract Non-member Functions
  6. Reduce the Global State

Why do all guides use #using namespace std if it’s supposedly really bad practice?

Reddit

C++17 Zero allocation Coroutine/[Resumable function] library

GitHub

This does not use C++20 coroutines. It is a managed state machine style coroutine library, a modern take on Duff’s device.

Reddit

I do not buy any of these anti-coroutine arguments (maybe except for the fact that HALO can fail in some situations – but that is an engineering problem in the compiler). =>

Later, same author on Reddit: C++20 coroutines, opinions? And yes, Rust gets mentioned.

C/C++: 70x faster file embeds using string literals

Article

Why I like C++ attributes

Marius Bancila

Unpopular opinion: It’s ok to derive from STL types/classes

Reddit

C++ STL-Like Algorithm Libraries

Conor Hoekstra

Library: Libcu++ - the NVIDIA Standard Library

GitHub

Recursive lambdas in C++

Philip Trettner

1auto fib = [](int n, auto&& fib) {
2  if (n <= 1) return n;
3  return fib(n - 1, fib) + fib(n - 2, fib);
4};
5auto i = fib(7, fib);

Programmer on vacation