Hello. While reading the operator overloading chapter of Thinking in C++ I came across the author saying that if there exist two separate definitions for type conversion between two user-defined types, one being an operator and the other a constructor, the compiler gives an error. But when I tried this, I found that the compiler (at least GCC) does not raise an error and prefers the constructor to the operator. Please peruse the attached code. You need to compile with -DALLOWCONS to enable the constructor: g++ -o ambiguous ambiguous-type-conversion.cpp -DALLOWCONS ./ambiguous-type-conversion g++ -o ambiguous ambiguous-type-conversion.cpp ./ambiguous-type-conversion You observe that the constructor is used when present, in preference to the operator. Is there a reason for this? I mean I would expect at least a warning in such a case, like I get when I initialize a variable with the extern keyword. Shriramana Sharma. P.S: I had to resort to somewhat ugly hacks to actually get the two user-defined classes to define the constructor and operator -- the example provided in the book is incomplete. One is the forward declaration of the second class before the first class. Two is the friend declaration of the second class within the first class. Three is the definition of the operator of the first class *after* the second class.