class ConvertTo {};
class COnvertable
{
public:
explicit operator ConvertTo () const
{
return ConvertTo();
};
};
void Func(ConvertTo ct)
{
}
void test ()
{
COnvertable c;
ConvertTo ct(c); // 调用1
// ConvertTo ct2 = c;
ConvertTo ct3 = static_cast<ConvertTo>(c);
// Func(c);
}
class COnvertable
{
public:
explicit operator ConvertTo () const
{
return ConvertTo();
};
};
void Func(ConvertTo ct)
{
}
void test ()
{
COnvertable c;
ConvertTo ct(c); // 调用1
// ConvertTo ct2 = c;
ConvertTo ct3 = static_cast<ConvertTo>(c);
// Func(c);
}