我尝试使用 abseil 的字符串库,但该简单示例已经无法运行并以 terminate called after throwing an instance of 'std::bad_alloc'
失败。
我使用的代码片段
#include "absl/strings/str_cat.h"
#include "fmt/core.h"
int main(){
auto s1 = absl::StrCat("A string "," another string","yet another string");
fmt::print( "{}\n",s1);
}
我将 Abseil 20200923.2 与 conan/cmake 一起使用。我尝试了 gcc 10.1 和 clang 11,结果都一样。我怎样才能运行这段代码?