@@ -793,6 +793,9 @@ struct BaseTraits
793793template <typename _UnsignedBits, typename T>
794794struct BaseTraits <UNSIGNED_INTEGER, _UnsignedBits, T>
795795{
796+ static_assert (::cuda::std::numeric_limits<T>::is_specialized,
797+ " Please also specialize cuda::std::numeric_limits for T" );
798+
796799 using UnsignedBits = _UnsignedBits;
797800 static constexpr UnsignedBits LOWEST_KEY = UnsignedBits(0 );
798801 static constexpr UnsignedBits MAX_KEY = UnsignedBits(-1 );
@@ -830,6 +833,9 @@ struct BaseTraits<UNSIGNED_INTEGER, _UnsignedBits, T>
830833template <typename _UnsignedBits, typename T>
831834struct BaseTraits <SIGNED_INTEGER, _UnsignedBits, T>
832835{
836+ static_assert (::cuda::std::numeric_limits<T>::is_specialized,
837+ " Please also specialize cuda::std::numeric_limits for T" );
838+
833839 using UnsignedBits = _UnsignedBits;
834840
835841 static constexpr UnsignedBits HIGH_BIT = UnsignedBits(1 ) << ((sizeof (UnsignedBits) * 8 ) - 1 );
@@ -865,6 +871,9 @@ struct BaseTraits<SIGNED_INTEGER, _UnsignedBits, T>
865871template <typename _UnsignedBits, typename T>
866872struct BaseTraits <FLOATING_POINT, _UnsignedBits, T>
867873{
874+ static_assert (::cuda::std::numeric_limits<T>::is_specialized,
875+ " Please also specialize cuda::std::numeric_limits for T" );
876+
868877 using UnsignedBits = _UnsignedBits;
869878
870879 static constexpr UnsignedBits HIGH_BIT = UnsignedBits(1 ) << ((sizeof (UnsignedBits) * 8 ) - 1 );
0 commit comments