[LC++]Compiles with g++-3.2 but later versions flakey. Why?
chris at cvine.freeserve.co.uk
Thu Oct 27 03:05:02 UTC 2005
On Wednesday 26 October 2005 02:19, Dr Mark H Phillips wrote:
> On Tue, 2005-10-25 at 20:54 +0100, Chris Vine wrote:
> > I should have thought they would all compile, the last because of Koenig
> > lookup.
> That's what I thought. Indeed, that's what I a relying on. My code
> worked fine on g++-3.2 but now fails on the newer versions of g++. Very
> > Does it make any difference if you make dummyFunct a DummyFunct object
> > rather than a reference to a DummyFunct object?
> Yes it does (see the email I just sent to the list). It works fine if I
> use a functoid object rather than a reference to one.
That's interesting. I wonder if gcc has a problem with references to
zero-sized objects. Does it make any difference if you put a dummy data
member in each object?
More information about the tuxCPProgramming