blob: 9bd7e60d5bcac121096a66a1f1a712e3e9d19ec0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
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(
|