Use static_assert instead of typedef hack.