You can use boost::format for template style string interpolations, like so:

```c++
return str(boost::format("*3\r\n$6\r\n"
                  "CLIENT\r\n"
                  "$7\r\n"
                  "SETNAME\r\n"
                  "$%d\r\n"
                  "%s\r\n") % client_name.length() % client_name)
```