#include <string>
#include <iostream>

using namespace std;

class Foo {
public:
  Foo(const Foo &foo) : str(foo.str) {}
  Foo(string str) : str(str) {}

  string str;
};

void printFoo(Foo foo) {
  cout << foo.str << endl;
}

int main() {
  Foo foo("qux");
  printFoo(foo); // OK

  printFoo("qix"s);

  return 0;
}