Skip to content

Commit

Permalink
fix: check to make sure both 'if constexpr' and return type deduction…
Browse files Browse the repository at this point in the history
… are available
  • Loading branch information
joshessman-llnl committed Oct 13, 2021
1 parent dcd282b commit 6f65384
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fmt/compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const T& first(const T& value, const Tail&...) {
return value;
}

#ifdef __cpp_if_constexpr
#if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
template <typename... Args> struct type_list {};

// Returns a reference to the argument at index N from [first, rest...].
Expand Down Expand Up @@ -530,7 +530,7 @@ constexpr auto compile(S format_str) {
return result;
}
}
#endif // __cpp_if_constexpr
#endif // defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
} // namespace detail

FMT_MODULE_EXPORT_BEGIN
Expand Down

0 comments on commit 6f65384

Please sign in to comment.