mirror of
https://github.com/MariaDB/server.git
synced 2025-08-16 18:19:41 +00:00
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: Ruoyu Zhong <zhongruoyu@outlook.com>
This commit is contained in:

committed by
Daniel Black

parent
bf3b787e02
commit
f4cec369a3
@ -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)
|
||||
|
Reference in New Issue
Block a user