{Attribute,Type}::classof are never actually called at runtime due to
the early exit in their CastInfo implementations. By using `if
constexpr` we can avoid needing to define them.
We also don't need to check is_same_v here, since this is already
covered by is_base_of_v.
On second look I'm not sure why is_same_v is used here, since is_base_of_v<T, T> is already true for the types we care about: https://en.cppreference.com/w/cpp/types/is_base_of