24#include <fmt/printf.h>
39 inline __attribute__((always_inline))
auto vformat(std::string_view fmt, fmt::format_args args)
42 return fmt::vformat(fmt, args);
43 }
catch (
const std::exception &e) {
59 inline __attribute__((always_inline))
auto vformat(fmt::string_view fmt, fmt::format_args args)
62 return fmt::vformat(fmt, args);
63 }
catch (
const std::exception &e) {
81 template<
typename... T>
82 inline __attribute__((always_inline))
auto format(fmt::format_string<T...> fmt, T &&...args)
84 return sham::vformat(fmt, fmt::make_format_args(
args...));
100 template<
typename... T>
101 inline __attribute__((always_inline))
auto format_printf(
102 std::string_view format,
const T &...args) -> std::string {
104 return fmt::sprintf(format,
args...);
105 }
catch (
const std::exception &e) {
115 using ::sham::format;
116 using ::sham::format_printf;
117 using ::sham::vformat;
Type aliases for fmt types used throughout shamformat.
namespace for backends this one is named only sham since shambackends is too long to write
sham::format_error make_format_exception(std::string_view function_call, std::string_view what, const std::string &fmt_string, std::source_location loc=std::source_location::current())
Create a format error exception.
namespace for basic c++ utilities
std::vector< std::string_view > args
Executable argument list (mapped from argv).