Skip to content

Commit

Permalink
Fix SFINAE bug in gcc 11
Browse files Browse the repository at this point in the history
Versions of gcc were incorrectly reporting errors in the `nth_backend`
helper function, even though it is (as far as I can tell) correctly
defined. This commit adds some failsafes.
  • Loading branch information
stephenswat committed Jan 12, 2024
1 parent 12c8a37 commit 8a317e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/core/covfie/core/utility/backend_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#pragma once

#include <variant>
#include <cstddef>

namespace covfie::utility {
Expand All @@ -30,6 +31,7 @@ struct nth_backend<B, 0, true> {

template <typename B, std::size_t N>
struct nth_backend<B, N, true> {
using type = std::monostate;
};

template <typename B, bool = B::is_initial>
Expand Down

0 comments on commit 8a317e0

Please sign in to comment.