הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
illegal copy-initialization; more than one user-defined conversion has been implicitly applied
Remarks
More than one user-defined conversion routine was found. The compiler executed the code in all such routines.
This warning is off by default. See Compiler Warnings That Are Off by Default for more information.
Example
The following example generates C4928:
// C4928.cpp
// compile with: /W1
#pragma warning(default: 4928)
struct I
{
};
struct I1 : I
{
};
struct I2 : I
{
};
template <class T>
struct Ptr
{
operator T*()
{
return 0;
}
Ptr()
{
}
Ptr(I*)
{
}
};
int main()
{
Ptr<I1> p1;
Ptr<I2> p2 = p1; // C4928
// try one of the following two lines to resolve this error
// Ptr<I2> p2(p1);
// Ptr<I2> p2 = (I1*) p1;
}