relational::operator bool()

Douglas Gregor gregod at cs.rpi.edu
Fri Nov 16 19:34:38 CET 2001


On Friday 16 November 2001 11:46 am, you wrote:
> On Wed, 14 Nov 2001, Douglas Gregor wrote:
> > I've attached the patch against current CVS. It will break binary
> > compatibility on some platforms.
>
> What's the criterion for such a platform?  (It sure breaks on
> Linux-x86/GCC.)

I can guess at what the criterion would be for it to _not_ break on a given 
platform:
  1) sizeof(bool) == sizeof(pointer-to-member-function)
  2) a NULL pointer-to-member has integral value 0

I would guess that the first condition does not hold for Linux-x86/GCC. I 
seem to recall that pointers-to-members of polymorphic classes are "fat", 
because they need to carry some run-time type information with them to deal 
with the possibilities of multiple/virtual inheritance.

	Doug



More information about the GiNaC-devel mailing list