Skip to content

Commit

Permalink
Fix for Issue #135
Browse files Browse the repository at this point in the history
Two small compiler issues in variant fixed.
  • Loading branch information
thirtytwobits committed Oct 13, 2024
1 parent 37d19af commit 6f531f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/cetl/pf17/variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ struct chronomorphize_impl<std::index_sequence<Is...>>
#endif
std::array<R (*)(F&&, Args&&...), sizeof...(Is)>
lut = {
[](F&& fn, Args&&... ar) -> R {
[](F&& fn, Args&&... arr) -> R {
return std::forward<F>(fn)(std::integral_constant<std::size_t, Is>{},
std::forward<Args>(ar)...);
std::forward<Args>(arr)...);
}...,
};
return lut.at(index)(std::forward<F>(fun), std::forward<Args>(ar)...);
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 6f531f1

Please sign in to comment.