Skip to content

FMT_ENFORCE_COMPILE_STRING broken in 7.1.2 with format-inl.h #2002

Description

@yeswalrus

Several lines in format-inl.h do not use FMT_STRING, which causes static assertion failures with FMT_ENFORCE_COMPILE_STRING.

In file included from external/fmt/src/format.cc:8:
In file included from external/fmt/include/fmt/format-inl.h:28:
In file included from external/fmt/include/fmt/format.h:44:
external/fmt/include/fmt/core.h:522:3: error: static_assert failed due to requirement 'is_compile_string<char [7]>::value' "FMT_ENFORCE_COMPILE_STRING requires all format strings to use FMT_STRING."
  static_assert(is_compile_string<S>::value,
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/fmt/include/fmt/core.h:1625:11: note: in instantiation of function template specialization 'fmt::v7::detail::check_format_string<fmt::v7::basic_string_view<char> &, char *&, char [7], 0>' requested here
  detail::check_format_string<Args...>(format_str);
          ^
external/fmt/include/fmt/core.h:2004:28: note: in instantiation of function template specialization 'fmt::v7::make_args_checked<fmt::v7::basic_string_view<char> &, char *&, char [7], char>' requested here
  const auto& vargs = fmt::make_args_checked<Args...>(format_str, args...);
                           ^
external/fmt/include/fmt/format-inl.h:2723:9: note: in instantiation of function template specialization 'fmt::v7::format_to<fmt::v7::detail::buffer_appender<char>, char [7], fmt::v7::basic_string_view<char> &, char *&, true>' requested here
        format_to(detail::buffer_appender<char>(out), "{}: {}", message,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions