
Update the patch to fix builds with NVCC <= 10.2.89 with the accepted PR for upcoming releases of the library.
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
From d7fb6201cbe830c2aef35b3fd0df040f9eae6d4d Mon Sep 17 00:00:00 2001
|
|
From: Gavin Ridley <gavin.keith.ridley@gmail.com>
|
|
Date: Tue, 31 Dec 2019 14:42:14 -0500
|
|
Subject: [PATCH] now compiles in nvcc 10.2
|
|
|
|
---
|
|
include/mpark/variant.hpp | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/include/mpark/variant.hpp b/include/mpark/variant.hpp
|
|
index ef496619b..f4848db88 100644
|
|
--- a/include/mpark/variant.hpp
|
|
+++ b/include/mpark/variant.hpp
|
|
@@ -2001,20 +2001,20 @@ namespace mpark {
|
|
#ifdef MPARK_CPP14_CONSTEXPR
|
|
namespace detail {
|
|
|
|
- inline constexpr bool all(std::initializer_list<bool> bs) {
|
|
+ inline constexpr bool any(std::initializer_list<bool> bs) {
|
|
for (bool b : bs) {
|
|
- if (!b) {
|
|
- return false;
|
|
+ if (b) {
|
|
+ return true;
|
|
}
|
|
}
|
|
- return true;
|
|
+ return false;
|
|
}
|
|
|
|
} // namespace detail
|
|
|
|
template <typename Visitor, typename... Vs>
|
|
inline constexpr decltype(auto) visit(Visitor &&visitor, Vs &&... vs) {
|
|
- return (detail::all({!vs.valueless_by_exception()...})
|
|
+ return (!detail::any({vs.valueless_by_exception()...})
|
|
? (void)0
|
|
: throw_bad_variant_access()),
|
|
detail::visitation::variant::visit_value(
|
|
|