From d7fb6201cbe830c2aef35b3fd0df040f9eae6d4d Mon Sep 17 00:00:00 2001 From: Gavin Ridley 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 bs) { + inline constexpr bool any(std::initializer_list bs) { for (bool b : bs) { - if (!b) { - return false; + if (b) { + return true; } } - return true; + return false; } } // namespace detail template 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(