[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Covariant Returns
From:       Benjamin Scherrey <scherrey () switchco ! com>
Date:       2000-02-15 8:09:06
[Download RAW message or body]

	I've got a rather complex multiple-inheritance situation (no, it
really can't be eliminated) where covariant returns would greatly
simply my code by allowing me to specify an additional parent as
virtual. Looking back at the messages in this forum on the subject, it
seems like there's quite a bit of work before this is fully
implemented. Is work progressing on this issue and is there any
expectation that this feature will be available any time soon? 
	
	Presently we're using the gcc-2.95.2 release under Intel/Linux &
Solaris. As it is, my current work-around sometimes results in a
bizarre and unneeded constructor being executed and a pure-virtual
method being called afterwards. This results simply from accessing a
data item in the leaf-class instance from a function defined in that
leaf. It makes no sense (appears to be a true compiler bug) and I'm
trying to construct a smaller test case reproduction but my true
solution would be to abandon the work-around if covariant returns were
implemented. 

	thanx & later,

		Ben Scherrey

PS: If anyone wants to look at about 46Kbytes of source code to see
this bug I'd be happy to send it. Its lots of templates and
inheritance but the bug is easily reproduced within this code, just
hard to re-implement in a smaller scenario.. I know I know... :-(

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic