If you look at the 2 candidates that it provides you'll notice that they are constructors for the std::complex class. The compiler is confused and don't even see the conversion operator in this case.