cpp-common/bt2c/logging.hpp: change type of `fmt` parameters to `fmt::format_string`
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 29 Apr 2024 19:45:47 +0000 (19:45 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 7 May 2024 15:03:39 +0000 (11:03 -0400)
commita1a4e6f6c334763a1eea2fecc0606a0615f91c93
tree1347fa4092172f3d07e15976ff7f0e0d107553c7
parente6a82b001b968f4dad0fc77fad6760009ba7fdc2
cpp-common/bt2c/logging.hpp: change type of `fmt` parameters to `fmt::format_string`

When compiled as C++20, this will enable doing some compile-time checks
of fmt format strings.  I don't think there will be a negative impact
when building as C++11.

Even though `fmt::format_string` is lightweight (it consists of just a
string view), I chose to `std::move` it when passing it across
functions, even if it doesn't change anything today.  It's not our type,
so it is subject to change without us knowing, perhaps it will gain a
move constructor one day.

Change-Id: Ib8761d4249c6c10b9978f7177f219914b6782f76
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12498
Tested-by: jenkins <jenkins@lttng.org>
src/cpp-common/bt2c/logging.hpp
This page took 0.02548 seconds and 4 git commands to generate.