Commit f4cec369 authored by Ruoyu Zhong's avatar Ruoyu Zhong Committed by Daniel Black

MDEV-31963 cmake: fix libfmt usage

`fmt::detail::make_arg` does not accept temporaries, so the code snippet
checking system libfmt needs to be adjusted.
Signed-off-by: default avatarRuoyu Zhong <zhongruoyu@outlook.com>
parent bf3b787e
......@@ -33,8 +33,9 @@ MACRO (CHECK_LIBFMT)
#include <fmt/format-inl.h>
#include <iostream>
int main() {
int answer= 42;
fmt::format_args::format_arg arg=
fmt::detail::make_arg<fmt::format_context>(42);
fmt::detail::make_arg<fmt::format_context>(answer);
std::cout << fmt::vformat(\"The answer is {}.\",
fmt::format_args(&arg, 1));
}" HAVE_SYSTEM_LIBFMT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment