fork(2) download
#include 

int main()
{
     std::string a = "hello world";

     std::string().swap(a);
//   a.swap(std::string()); -- can't work due to temp
}
Success #stdin #stdout 0.01s 2852KB
stdin
Standard input is empty
stdout

Standard output is empty