7#include "forward_value.hpp"
8#include "fixed_string.hpp"
12namespace hi::inline v1 {
18template<basic_fixed_string Fmt,
typename... Values>
21 static_assert(std::is_same_v<
decltype(Fmt)::value_type,
char>,
"Fmt must be a basic_fixed_string<char>");
41 template<
typename... Args>
51 return std::apply(format_wrapper<Values const &...>, _values);
60 return std::apply(format_locale_wrapper<Values const &...>, _values);
66 template<
typename... Args>
67 static std::string format_wrapper(Args
const &...args)
69 return std::format(Fmt, args...);
72 template<
typename... Args>
75 return std::format(loc, Fmt, args...);
79template<basic_fixed_string Fmt,
typename... Args>
80delayed_format(Args &&...) -> delayed_format<Fmt, forward_value_t<Args>...>;
Delayed formatting.
Definition delayed_format.hpp:19
delayed_format(Args const &...args) noexcept
Construct a delayed format.
Definition delayed_format.hpp:42
std::string operator()(std::locale const &loc) const noexcept
Format now.
Definition delayed_format.hpp:58
std::string operator()() const noexcept
Format now.
Definition delayed_format.hpp:49