You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}