Replace deprecated GenericReference*.
Make constexpr methods static to conform C++1y.

Clang produces a warning otherwise.
Fix a couple of headercheck issues.