@@ -793,6 +793,9 @@ struct BaseTraits
793
793
template <typename _UnsignedBits, typename T>
794
794
struct BaseTraits <UNSIGNED_INTEGER, _UnsignedBits, T>
795
795
{
796
+ static_assert (::cuda::std::numeric_limits<T>::is_specialized,
797
+ " Please also specialize cuda::std::numeric_limits for T" );
798
+
796
799
using UnsignedBits = _UnsignedBits;
797
800
static constexpr UnsignedBits LOWEST_KEY = UnsignedBits(0 );
798
801
static constexpr UnsignedBits MAX_KEY = UnsignedBits(-1 );
@@ -830,6 +833,9 @@ struct BaseTraits<UNSIGNED_INTEGER, _UnsignedBits, T>
830
833
template <typename _UnsignedBits, typename T>
831
834
struct BaseTraits <SIGNED_INTEGER, _UnsignedBits, T>
832
835
{
836
+ static_assert (::cuda::std::numeric_limits<T>::is_specialized,
837
+ " Please also specialize cuda::std::numeric_limits for T" );
838
+
833
839
using UnsignedBits = _UnsignedBits;
834
840
835
841
static constexpr UnsignedBits HIGH_BIT = UnsignedBits(1 ) << ((sizeof (UnsignedBits) * 8 ) - 1 );
@@ -865,6 +871,9 @@ struct BaseTraits<SIGNED_INTEGER, _UnsignedBits, T>
865
871
template <typename _UnsignedBits, typename T>
866
872
struct BaseTraits <FLOATING_POINT, _UnsignedBits, T>
867
873
{
874
+ static_assert (::cuda::std::numeric_limits<T>::is_specialized,
875
+ " Please also specialize cuda::std::numeric_limits for T" );
876
+
868
877
using UnsignedBits = _UnsignedBits;
869
878
870
879
static constexpr UnsignedBits HIGH_BIT = UnsignedBits(1 ) << ((sizeof (UnsignedBits) * 8 ) - 1 );
0 commit comments