Skip to content

Commit

Permalink
Wrap fmt::runtime on fmt older than 8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAce committed Mar 7, 2024
1 parent 18f2fbe commit 87e12a5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/h5pp/details/h5ppFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,19 @@
#if defined(FMT_FORMAT_H_) && (defined(H5PP_USE_FMT) || defined(H5PP_USE_SPDLOG))

namespace h5pp {
#if defined(FMT_VERSION) && FMT_VERSION >= 81000
using fmt::format;
using fmt::print;
using fmt::runtime;
using fmt::vformat;
#else
using fmt::format;
using fmt::print;
template<typename... Args>
[[nodiscard]] std::string runtime(Args... args) {
return fmt::format(std::forward<Args>(args)...);
}
#endif

}
#else

Expand Down

0 comments on commit 87e12a5

Please sign in to comment.