diff options
| author | 2023-01-23 02:59:13 +0000 | |
|---|---|---|
| committer | 2023-01-23 13:07:52 +0000 | |
| commit | 671b84ecf2a86ee66e889e3931823bd6224d1dea (patch) | |
| tree | a4d13dc93481b4598610931881f4ce50de2abfdc /include | |
| parent | Default more stuff inline in the InspIRCd class. (diff) | |
Vendor the fmtlib library.
Diffstat (limited to 'include')
| -rw-r--r-- | include/inspstring.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 <fmt/compile.h> +# define INSP_FORMAT(FORMAT, ...) fmt::format(FMT_COMPILE(FORMAT), __VA_ARGS__) +#else +# include <fmt/core.h> +# define INSP_FORMAT(FORMAT, ...) fmt::format(FMT_STRING(FORMAT), __VA_ARGS__) +#endif + namespace Base64 { /** The default table used when handling Base64-encoded strings. */ |
