bil050 0 Newbie Poster

struct A { virtual A* f() { return this; } };
struct B: virtual A { B* f() { return this; } };

The GNU compiler gives an error:

sorry, unimplemented: adjusting pointers for covariant returns

What is the problem?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.