74 template <
typename... Args>
78 template <
typename... Args>
81 static constexpr auto format_array =
82 detail::make_format_str<
sizeof...(Args) + 2 + (
sizeof...(Args) == 1)>();
83 static constexpr std::string_view format_str{format_array.data()};
86 static constexpr auto converter = []<
typename T>(T&& item) ->
decltype(
auto) {
87 if constexpr (std::convertible_to<T, std::string_view>) {
88 return std::string_view{std::forward<T>(item)};
90 return std::forward<T>(item);
95 const std::string_view file_name{location.file_name()};
96 auto file_name_without_directory = file_name.substr(file_name.find_last_of(U8(R
"(/\)")) + 1);
98 if constexpr (
sizeof...(Args) == 1) {
99 return format(format_str, U8(
"File"), file_name_without_directory, U8(
"Message"),
100 converter(std::forward<Args>(args))...);
103 format_str, U8(
"File"), file_name_without_directory, converter(std::forward<Args>(args))...);