Skip to content

Commit

Permalink
Address build failures when using Tip-of-Tree clang. (fmtlib#4187)
Browse files Browse the repository at this point in the history
When using ToT clang to build fmtlib, it complains 'sv' is not
initialized by a constant expression. This patch addresses this
issue.
  • Loading branch information
zeroomega authored Oct 4, 2024
1 parent e62c41f commit 22701d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -2662,7 +2662,7 @@ template <typename... T> struct fstring {
template <typename S,
FMT_ENABLE_IF(std::is_convertible<const S&, string_view>::value)>
FMT_CONSTEVAL FMT_ALWAYS_INLINE fstring(const S& s) : str(s) {
FMT_CONSTEXPR auto sv = string_view(S());
auto sv = string_view(str);
if (FMT_USE_CONSTEVAL)
detail::parse_format_string<char>(sv, checker(sv, arg_pack()));
#ifdef FMT_ENFORCE_COMPILE_STRING
Expand Down

0 comments on commit 22701d5

Please sign in to comment.