#include <iostream>
#include <string>
struct Foo {
Foo (std::string x) { std::cout << x << std::endl; }
};
std::string x("hello, world");
int main () { Foo(x); }
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKc3RydWN0IEZvbyB7CiAgICBGb28gKHN0ZDo6c3RyaW5nIHgpIHsgc3RkOjpjb3V0IDw8IHggPDwgc3RkOjplbmRsOyB9Cn07CgpzdGQ6OnN0cmluZyB4KCJoZWxsbywgd29ybGQiKTsKCmludCBtYWluICgpIHsgRm9vKHgpOyB9
prog.cpp: In function ‘int main()’:
prog.cpp:10:20: error: no matching function for call to ‘Foo::Foo()’
int main () { Foo(x); }
^
prog.cpp:10:20: note: candidates are:
prog.cpp:5:5: note: Foo::Foo(std::string)
Foo (std::string x) { std::cout << x << std::endl; }
^
prog.cpp:5:5: note: candidate expects 1 argument, 0 provided
prog.cpp:4:8: note: Foo::Foo(const Foo&)
struct Foo {
^
prog.cpp:4:8: note: candidate expects 1 argument, 0 provided