Echo Writes Code

0000.0001.md

Add requires core::utility::UnqualifiedObject<T> anywhere that we store a T

Explanation

Lots of our types have the same few static_assert()s as the first few statements in their bodies:

  • Not a reference
  • Not const
  • Not volatile

Strictly speaking, the only ones we need from this list are reference and const, but volatile completes the picture (and instantiating a template with a volatile type is probably a bug anyway).

These assertions are now encapsulated in the core::utility::UnqualifiedObject concept. This communicates intent more clearly and is also less boilerplate.

Task

Apply requires core::utility::UnqualifiedObject<T> to every type where it makes sense. Note that it should almost entirely be applied to class templates, not function templates; unless the function is creating a local variable of type T, there's no reason to add more boilerplate in places where it doesn't matter.