C++ Quiz #1

1 · Dennis Felsing · Nov. 30, 2017, 11 p.m.
What is the output of this small snippet that is based on real C++ code? #include <iostream> struct Foo { Foo() { std::cout << "standard" << std::endl; } Foo(const Foo&) { std::cout << "copy" << std::endl; } Foo(int) { std::cout << "int" << std::endl; } Foo(int, int) { std::cout << "int, int" << std::endl; } Foo(const Foo&, int) { std::cout << "Foo, int" << std::endl; } Foo(int, const Foo&) { std::cout << "int, Foo" << std::endl; } }; void f(Foo) {} struct Bar { i...