Boost logo

Boost :

From: Lee Brown (lee_at_[hidden])
Date: 2002-01-13 15:58:01


> template <class T>
> struct is_polymorphic
> {
> struct d1 : public T
> {
> d1();
> char padding[256];
> };
> struct d2 : public T
> {
> d2();
> virtual ~d2();
> virtual void foo();
> char padding[256];
> };
> BOOST_STATIC_CONSTANT(bool, value = (sizeof(d2) == sizeof(d1)));
> };

This reminds me of the guy who got wings and flew too close to the sun.
I understand that a programmer sometimes has got to do what he's got to
do, but .... C++ was designed to avoid this sort of hack.

lee


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk