Improved error messages by using static_assert instead of enable_if.