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.
I wouldn't call these update as they don't actually update anything and just return the value. In other parts of the codebase we use compute for functions like this.