Hi,
In my code I use two implicit casts in a row. VC compiled it in all
version I have. 7.1 and 8.0, but it seems not to be standard. Comeau in
strict mode and gcc don't accept it.
Of course, I can just throw a cast in C c = (C)b;
but this is not what I want. I want to enable implicit conversion.
Any idea?
Ingo
// main.cpp:
class A{};
class B
{
public:
operator A( )
{
return a;
}
A a;
};
class C
{
public:
C( A const& a ) { }
};
int main()
{
B b;
C c = b;
}