Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixx test issues against gcc-6 #1477

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// <cuda/std/array>
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: gcc-7, gcc-8
// UNSUPPORTED: gcc-6, gcc-7, gcc-8
// UNSUPPORTED: nvcc-11.1

// template <typename T, size_t Size>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@ int main(int, char**)
}
#endif // defined(_LIBCUDACXX_HAS_LIST)

#if TEST_STD_VER > 2011 && !defined(TEST_COMPILER_NVRTC) && !defined(TEST_COMPILER_CUDACC_BELOW_11_3)
#if TEST_STD_VER > 2011 && !defined(TEST_COMPILER_NVRTC) && \
!defined(TEST_COMPILER_CUDACC_BELOW_11_3) && \
defined(_LIBCUDACXX_ADDRESSOF)
{
typedef cuda::std::reverse_iterator<const C *> RI;
constexpr RI it1 = cuda::std::make_reverse_iterator(gC + 1);

static_assert(it1->get() == gC[0].get(), "");
}
#endif
#endif // TEST_STD_VER > 2011 && !TEST_COMPILER_NVRTC && !TEST_COMPILER_CUDACC_BELOW_11_3 && _LIBCUDACXX_ADDRESSOF
{
unused(gC);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

int main(int, char**)
{
#if !defined(TEST_COMPILER_GCC) || __GNUC__ >= 7
static_assert(!cuda::std::is_assignable<cuda::std::variant<int, int>, int>::value, "");
#endif // !gcc-6
static_assert(!cuda::std::is_assignable<cuda::std::variant<long, long long>, int>::value, "");
static_assert(cuda::std::is_assignable<cuda::std::variant<char>, int>::value == VariantAllowsNarrowingConversions, "");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ struct Baz {};
__host__ __device__
void test_construction_with_repeated_types() {
using V = cuda::std::variant<int, Bar, Baz, int, Baz, int, int>;
#if !defined(TEST_COMPILER_GCC) || __GNUC__ >= 7
static_assert(!cuda::std::is_constructible<V, int>::value, "");
static_assert(!cuda::std::is_constructible<V, Baz>::value, "");
#endif // !gcc-6
// OK, the selected type appears only once and so it shouldn't
// be affected by the duplicate types.
static_assert(cuda::std::is_constructible<V, Bar>::value, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

int main(int, char**)
{
#if !defined(TEST_COMPILER_GCC) || __GNUC__ >= 7
static_assert(!cuda::std::is_constructible<cuda::std::variant<int, int>, int>::value, "");
#endif // !gcc-6
static_assert(!cuda::std::is_constructible<cuda::std::variant<long, long long>, int>::value, "");
static_assert(cuda::std::is_constructible<cuda::std::variant<char>, int>::value == VariantAllowsNarrowingConversions, "");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16
// UNSUPPORTED: clang-7, clang-8
// UNSUPPORTED: gcc-6

// <cuda/std/variant>
// template <class R, class Visitor, class... Variants>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16
// UNSUPPORTED: clang-7, clang-8
// UNSUPPORTED: gcc-6

// <cuda/std/variant>
// template <class R, class Visitor, class... Variants>
Expand Down
Loading