diff --git a/.upstream-tests/test/std/iterators/iterator.container/ssize.pass.cpp b/.upstream-tests/test/std/iterators/iterator.container/ssize.pass.cpp index 0a03d8b009..e48f3c5fad 100644 --- a/.upstream-tests/test/std/iterators/iterator.container/ssize.pass.cpp +++ b/.upstream-tests/test/std/iterators/iterator.container/ssize.pass.cpp @@ -29,14 +29,12 @@ #include "test_macros.h" - struct short_container { __host__ __device__ uint16_t size() const { return 60000; } // not noexcept }; - template __host__ __device__ void test_container(C& c) @@ -96,6 +94,7 @@ int main(int, char**) #if defined(_LIBCUDACXX_HAS_VECTOR) test_container ( v ); ASSERT_SAME_TYPE(ptrdiff_t, decltype(cuda::std::ssize(v))); +#endif #if defined(_LIBCUDACXX_HAS_LIST) test_container ( l ); ASSERT_SAME_TYPE(ptrdiff_t, decltype(cuda::std::ssize(l))); @@ -107,6 +106,7 @@ int main(int, char**) #if defined(_LIBCUDACXX_HAS_VECTOR) test_const_container ( v ); +#endif #if defined(_LIBCUDACXX_HAS_LIST) test_const_container ( l ); #endif diff --git a/.upstream-tests/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp b/.upstream-tests/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp index aeefa8b321..81f45b7e02 100644 --- a/.upstream-tests/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp +++ b/.upstream-tests/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp @@ -80,7 +80,9 @@ int main(int, char**) // SFINAE-able underlying_type #if TEST_STD_VER > 17 static_assert( has_type_member::value, ""); +#ifdef TEST_UNSIGNED_UNDERLYING_TYPE static_assert( has_type_member::value, ""); +#endif // TEST_UNSIGNED_UNDERLYING_TYPE static_assert( has_type_member::value, ""); static_assert(!has_type_member::value, ""); diff --git a/include/cuda/std/detail/libcxx/include/cmath b/include/cuda/std/detail/libcxx/include/cmath index 3ad44458e6..515164c7ad 100644 --- a/include/cuda/std/detail/libcxx/include/cmath +++ b/include/cuda/std/detail/libcxx/include/cmath @@ -689,8 +689,13 @@ _LIBCUDACXX_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT { static_assert(is_floating_point<_FloatT>::value, "must be a floating point type"); static_assert(is_integral<_IntT>::value, "must be an integral type"); static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix"); +#ifdef _LIBCUDACXX_HAS_COMPLEX_LONG_DOUBLE static_assert((_IsSame<_FloatT, float>::value || _IsSame<_FloatT, double>::value || _IsSame<_FloatT,long double>::value), "unsupported floating point type"); +#else + static_assert((_IsSame<_FloatT, float>::value || _IsSame<_FloatT, double>::value), + "unsupported floating point type"); +#endif return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits); }