Cantera  3.1.0a2
Loading...
Searching...
No Matches
fmt.h
Go to the documentation of this file.
1//! @file fmt.h Wrapper for either system-installed or local headers for fmt
2#ifndef CT_FMT_H
3#define CT_FMT_H
4#include "ct_defs.h"
5
6//! Do not use the fmt macro from fmtlib because it shadows a function of
7//! the same name in kinetics/Group.h
8#define FMT_NO_FMT_STRING_ALIAS
9
10//! Versions 6.2.0 and 6.2.1 of fmtlib do not include this define before they
11//! include windows.h, breaking builds on Windows. Fixed in fmtlib 7.0.0 and
12//! newer. https://github.com/fmtlib/fmt/pull/1616
13#if defined(_WIN32) && !defined(NOMINMAX)
14#define NOMINMAX
15#endif
16
17#if CT_USE_SYSTEM_FMT
18 #include <fmt/format.h>
19 #include <fmt/printf.h>
20 #include <fmt/ostream.h>
21#else
22 #include "cantera/ext/fmt/format.h"
23 #include "cantera/ext/fmt/printf.h"
24 #include "cantera/ext/fmt/ostream.h"
25#endif
26
27#if FMT_VERSION < 80000
28template <typename... Args>
29void fmt_append(fmt::memory_buffer& b, Args... args) {
30 format_to(b, args...);
31}
32#else
33template <typename... Args>
34void fmt_append(fmt::memory_buffer& b, Args... args) {
35 format_to(fmt::appender(b), args...);
36}
37#endif
38
39#endif
This file contains definitions of constants, types and terms that are used in internal routines and a...
void fmt_append(fmt::memory_buffer &b, Args... args)
Versions 6.2.0 and 6.2.1 of fmtlib do not include this define before they include windows....
Definition fmt.h:29