[C++-sig] Newcomer - constructors not working as I'd expect

Andrew Pontzen app26 at ast.cam.ac.uk
Mon Apr 10 11:01:08 CEST 2006


On Sun, 9 Apr 2006, David Abrahams wrote:

> I can't see anything wrong with your code.  It's admittedly pretty
> simple, but could you try to reduce it further?  It seems as though if
> it's broken as is, you could remove one level of inheritance at least,
> without changing anything.

You're right, removing test2 and even disinheriting test3 didn't 
change anything. It was just the constructor with the wrong call 
pattern which mucked things up (see Ralf's post.)

I originally constructed the example to explore another problem
which I cleared up for myself, but should have simplified it!

Thanks,

Andrew

-- 
Andrew Pontzen
app26 at ast.cam.ac.uk

Institute of Astronomy
Madingley Road
Cambridge
CB3 0HA
UK



More information about the Cplusplus-sig mailing list