From 6f531f1c341edee6e89798499a146cce176161dc Mon Sep 17 00:00:00 2001 From: Scott Dixon Date: Sun, 13 Oct 2024 13:57:01 -0700 Subject: [PATCH] Fix for Issue #135 Two small compiler issues in variant fixed. --- include/cetl/pf17/variant.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/cetl/pf17/variant.hpp b/include/cetl/pf17/variant.hpp index b485be0..3357e0f 100644 --- a/include/cetl/pf17/variant.hpp +++ b/include/cetl/pf17/variant.hpp @@ -87,9 +87,9 @@ struct chronomorphize_impl> #endif std::array lut = { - [](F&& fn, Args&&... ar) -> R { + [](F&& fn, Args&&... arr) -> R { return std::forward(fn)(std::integral_constant{}, - std::forward(ar)...); + std::forward(arr)...); }..., }; return lut.at(index)(std::forward(fun), std::forward(ar)...); @@ -212,7 +212,7 @@ constexpr inline void bad_access_unless(const bool condition) { if (!condition) { -#if __cpp_exceptions +#if defined(__cpp_exceptions) throw bad_variant_access{}; #else std::terminate();