B
Bart Vandewoestyne
I am trying to reproduce the ambiguity problem from the first example in Item 26 from Scott Meyers' book 'Effective C++'. My code is online at
https://github.com/BartVandewoestyn.../Effective_C++/item26/potential_ambiguity.cpp
In the book, no definition of A's copy constructor nor B's operator A() is given, so i defined it myself... hopefully correct somehow...
Compiling this code with g++ 4.6.2 and the -Wall option succeeds without errors and when I run it, i get:
A(const B&)
f(const A&)
so apparently A's copy constructor gets called and there's no ambiguity problem.
I was suspecting am ambiguity problem at compile time... what am I doing/interpreting wrong?
Regards,
Bart
https://github.com/BartVandewoestyn.../Effective_C++/item26/potential_ambiguity.cpp
In the book, no definition of A's copy constructor nor B's operator A() is given, so i defined it myself... hopefully correct somehow...
Compiling this code with g++ 4.6.2 and the -Wall option succeeds without errors and when I run it, i get:
A(const B&)
f(const A&)
so apparently A's copy constructor gets called and there's no ambiguity problem.
I was suspecting am ambiguity problem at compile time... what am I doing/interpreting wrong?
Regards,
Bart