poco
poco copied to clipboard
App crashes when using a Poco::format.
Debian 11 POCO version: 1.10.0 (gcc version 10.2.1)
Example code:
#include <Poco/Format.h>
template<typename... Args>
void funct(Args... args) {
std::string msg = Poco::format(args...);
}
int main()
{
bool var=false;
funct("Test %s", "test"); // crash
std::string var2="test";
funct("Test %s", var2.c_str()); // crash
funct("Test %s", var2); // OK
return 0;
}
On ubuntu 20.04 with POCO 1.9.2 (gcc version 9.3.0) everything works fine. What could be the reason? Is there a workaround here?
try this funct("Test %s", std::string("test")); Poco::format does not have the const char* funtion
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 60 days since being marked as stale.