December 21, 2002 undefined use of struct or union (operator T *&) | ||||
---|---|---|---|---|
| ||||
struct A
{ };
struct B
{
B()
{
a = new A;
}
operator A *&()
{
return a;
}
A *a;
};
int main()
{
A a;
B b;
*b = a;
// Error: undefined use of struct or union
return 0;
}
bye, Christof
--
http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de
...and what have you contributed to the Net?
|
Copyright © 1999-2021 by the D Language Foundation