|
Boost : |
From: Lee Brown (lee_at_[hidden])
Date: 2002-01-13 19:13:48
On Sunday 13 January 2002 13:59, you wrote:
> ----- Original Message -----
> From: "Lee Brown" <lee_at_[hidden]>
>
> > > 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.
>
> I have to disagree. If it were designed to avoid it, we would have a
I meant rely on compiler implementation.
> portable, standard way to do things like this - one that doesn't
> instantiate 3 more classes than neccessary. Maybe in the next standard...
OK.Speaking of standards, I wonder what the Man (Stroustrup) would think.
Maybe this sort of capability was left out on purpose. You'd know better than
me.
> -Dave
>
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
> <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk