This patch introduces a LazyMember template that allows specifying member variables
which values will be computed once they are read the first time. This is supposed to
replace the previously used LazyBool enum that is partly providing the same functionality
(but you have to do all the checks yourself).
The advantages of LazyMember over handwritten LazyBool code are:
- No more manual checking when reading the value somewhere.
- The compiler enforces now that we actually set a value before returning to the user.
- We can optimize this code further in the future for space/time without
having to revisit all the different places that use LazyBool.