Skip to content

Commit

Permalink
Fix MSVC issues (#1261)
Browse files Browse the repository at this point in the history
For some reasons CI is acting up parsing some macoss specific XFAILs

We do not support that, so just remove them

Fix an issue with MSVC not being able to call `construct_at` on a const qualified type

Addresses nvbug3843240
  • Loading branch information
miscco authored Jan 17, 2024
1 parent 6c729ed commit 5243a84
Show file tree
Hide file tree
Showing 51 changed files with 4 additions and 148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

_LIBCUDACXX_BEGIN_NAMESPACE_STD

template<class _Func, class... _Args, class = decltype(std::declval<_Func>()(std::declval<_Args>()...))>
template<class _Func, class... _Args, class = decltype(_CUDA_VSTD::declval<_Func>()(_CUDA_VSTD::declval<_Args>()...))>
_LIBCUDACXX_INLINE_VISIBILITY true_type __is_callable_helper(int);
template<class...>
_LIBCUDACXX_INLINE_VISIBILITY false_type __is_callable_helper(...);
Expand Down
5 changes: 3 additions & 2 deletions libcudacxx/include/cuda/std/detail/libcxx/include/optional
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ template<class T>
#include "__type_traits/is_trivially_move_constructible.h"
#include "__type_traits/is_object.h"
#include "__type_traits/negation.h"
#include "__type_traits/remove_cv.h"
#include "__utility/declval.h"
#include "__utility/forward.h"
#include "__utility/in_place.h"
Expand Down Expand Up @@ -266,7 +267,7 @@ struct __optional_destruct_base<_Tp, false>
union
{
char __null_state_;
value_type __val_;
__remove_cv_t<value_type> __val_;
};
bool __engaged_;

Expand Down Expand Up @@ -313,7 +314,7 @@ struct __optional_destruct_base<_Tp, true>
union
{
char __null_state_;
value_type __val_;
__remove_cv_t<value_type> __val_;
};
bool __engaged_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

// REQUIRES: has-unix-headers
// UNSUPPORTED: c++03
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1

#include <cuda/std/iterator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

// UNSUPPORTED: c++03, c++11, c++14

// This test uses iterator types from cuda::std::filesystem, which were introduced in macOS 10.15.
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}

// template<class T>
// struct iterator_traits;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>

// template<class F> constexpr auto and_then(F&&) &;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>

// template<class F> constexpr auto transform(F&&) &;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
//
// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>

// template <class U>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
//
// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>

// constexpr optional(const T& v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>

// constexpr optional(optional<T>&& rhs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
//
// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>

// constexpr optional(T&& v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>

// constexpr T& optional<T>::value() &;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>

// constexpr const T& optional<T>::value() const &;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>

// constexpr const T& optional<T>::value() const &&;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
// UNSUPPORTED: c++03, c++11
// <cuda/std/optional>

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// constexpr T& optional<T>::value() &&;

#include <cuda/std/optional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

// UNSUPPORTED: c++03, c++11

// Throwing bad_optional_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/optional>
//
// template <class T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
// UNSUPPORTED: msvc-19.16
// UNSUPPORTED: true

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}}

// <cuda/std/variant>

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

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <size_t I, class... Types>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class T, class... Types> constexpr T& get(variant<Types...>& v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>

// template <class ...Types> class variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>
// template <class Visitor, class... Variants>
// constexpr see below visit(Visitor&& vis, Variants&&... vars);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>
// template <class Visitor, class... Variants>
// constexpr see below visit(Visitor&& vis, Variants&&... vars);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>
// template <class Visitor, class... Variants>
// constexpr see below visit(Visitor&& vis, Variants&&... vars);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: msvc-19.16

// Throwing bad_variant_access is supported starting in macosx10.13
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}} && !no-exceptions

// <cuda/std/variant>
// template <class Visitor, class... Variants>
// constexpr see below visit(Visitor&& vis, Variants&&... vars);
Expand Down
Loading

0 comments on commit 5243a84

Please sign in to comment.