Open
Description
After upgrading project to С++20 and enabling modernize-use-std-format warning there is modernize-use-std-format clang tidy warning:
Unable to use 'std::format' instead of 'StrFormat' because first argument is not a narrow string literal [modernize-use-std-format]
The minimal code sample to reproduce problem (sample from documentation):
#include <absl/strings/str_format.h>
#include <string>
std::string getDescription(const std::string& description, int value)
{
return absl::StrFormat("The %s is %3d", description.c_str(), value);
}
Compile options: -g -stdlib=libc++ -std=c++20