1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
class A { public: A(int a) {} }; class B { public: B(A& a) {} }; int main() { B(A(5)); }
1 2 3
In function 'int main()': Line 15: error: no matching function for call to 'B::B(A)' compilation terminated due to -Wfatal-errors.