diff options
author | Axel Huebl <axel.huebl@plasma.ninja> | 2020-01-22 11:29:02 -0800 |
---|---|---|
committer | Greg Becker <becker33@llnl.gov> | 2020-01-22 11:29:02 -0800 |
commit | 7a0990903fbca221e044eb43edae6fd39dcca4eb (patch) | |
tree | 024baccb0a1764fbd144bda4275fe3404b998c48 /var | |
parent | ffbb0efc8186286b1211de11d69cd68b85dfddd6 (diff) | |
download | spack-7a0990903fbca221e044eb43edae6fd39dcca4eb.tar.gz spack-7a0990903fbca221e044eb43edae6fd39dcca4eb.tar.bz2 spack-7a0990903fbca221e044eb43edae6fd39dcca4eb.tar.xz spack-7a0990903fbca221e044eb43edae6fd39dcca4eb.zip |
MPark.Variant: Patch NVCC C++14 Build 2 (#14434)
Update the patch to fix builds with NVCC <= 10.2.89 with
the accepted PR for upcoming releases of the library.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/mpark-variant/nvcc.patch | 49 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/mpark-variant/package.py | 4 |
2 files changed, 33 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/mpark-variant/nvcc.patch b/var/spack/repos/builtin/packages/mpark-variant/nvcc.patch index 30ee06a4f9..9bd7e60d5b 100644 --- a/var/spack/repos/builtin/packages/mpark-variant/nvcc.patch +++ b/var/spack/repos/builtin/packages/mpark-variant/nvcc.patch @@ -1,27 +1,40 @@ -From 443d9454e8a665cef01cbf63036648a6e0ad9ffd Mon Sep 17 00:00:00 2001 -From: Axel Huebl <axel.huebl@plasma.ninja> -Date: Mon, 25 Nov 2019 17:56:38 -0800 -Subject: [PATCH] NVCC: Avoid Specific Constexpr Construct +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 -Out of the many C++14 `constexpr` constructs, one does not compile -with NVCC - even when using `-std=c++14 --expt-relaxed-constexpr`. -Seen with all versions of NVCC so far (latest tests with 10.1 and -10.2). --- - include/mpark/variant.hpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + 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..728e69395 100644 +index ef496619b..f4848db88 100644 --- a/include/mpark/variant.hpp +++ b/include/mpark/variant.hpp -@@ -1998,7 +1998,7 @@ namespace mpark { - return false; - } - --#ifdef MPARK_CPP14_CONSTEXPR -+#if defined(MPARK_CPP14_CONSTEXPR) && !defined(__NVCC__) +@@ -2001,20 +2001,20 @@ namespace mpark { + #ifdef MPARK_CPP14_CONSTEXPR namespace detail { - inline constexpr bool all(std::initializer_list<bool> bs) { +- 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( diff --git a/var/spack/repos/builtin/packages/mpark-variant/package.py b/var/spack/repos/builtin/packages/mpark-variant/package.py index 60fbc0a381..85b9bfb82d 100644 --- a/var/spack/repos/builtin/packages/mpark-variant/package.py +++ b/var/spack/repos/builtin/packages/mpark-variant/package.py @@ -16,8 +16,8 @@ class MparkVariant(CMakePackage): version('1.4.0', sha256='8f6b28ab3640b5d76d5b6664dda7257a4405ce59179220431b8fd196c79b2ecb') version('1.3.0', sha256='d0f7e41f818fcc839797a8017e76b8b66b323651c304cff641a83a56ae9943c6') - # Ref.: https://github.com/mpark/variant/pull/71 - patch('nvcc.patch') + # Ref.: https://github.com/mpark/variant/pull/73 + patch('nvcc.patch', when='@:1.4.0') conflicts('%gcc@:4.7') conflicts('%clang@:3.5') |