Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc: fix compilation error caused by fmt::runtime()
Depending on the 'SEASTAR_LOGGER_COMPILE_TIME_FMT' the declaration of 'logger::log()' function may use either 'fmt::format_string' or 'const char*' format parameter. In the case of the usage of 'const char*', there is a need to call 'fmt::runtime()' function to obtain format_string. When the project was built on Ubuntu 22.04 using the steps described in the tutorial, there was a compilation error related to passing argument with type 'fmt::format_string<>' to 'fmt::runtime()' that handles characters strings. This change introduces contexpr if statement to remove the compilation error and use 'fmt::runtime()' only when the function takes 'const char*'. Signed-off-by: Patryk Wrobel <[email protected]>
- Loading branch information