From 671b84ecf2a86ee66e889e3931823bd6224d1dea Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 23 Jan 2023 02:59:13 +0000 Subject: Vendor the fmtlib library. --- include/inspstring.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/inspstring.h b/include/inspstring.h index 7a43c6531..4ccba2a9e 100644 --- a/include/inspstring.h +++ b/include/inspstring.h @@ -38,6 +38,17 @@ va_end(_vaList); \ } while (false) +/** @def INSP_FORMAT(FORMAT, ...) + * Formats a string with format string checking. + */ +#if defined __cpp_if_constexpr && defined __cpp_return_type_deduction +# include +# define INSP_FORMAT(FORMAT, ...) fmt::format(FMT_COMPILE(FORMAT), __VA_ARGS__) +#else +# include +# define INSP_FORMAT(FORMAT, ...) fmt::format(FMT_STRING(FORMAT), __VA_ARGS__) +#endif + namespace Base64 { /** The default table used when handling Base64-encoded strings. */ -- cgit v1.3.1-10-gc9f91