Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-25 08:44:38


From: "Joe Gottman" <jgottman_at_[hidden]>
>
> "Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> wrote in message
> news:b0svlm$l1q$1_at_main.gmane.org...
> >
> > "Robert Ramey" <ramey_at_[hidden]> wrote in message
> > news:01C2C3B8.367B8A60_at_226-146.adsl2.netlojix.net...
> > > Is there such a thing as is_abstract_base<T> similar to
> is_polymorphic<T>
> > ?
> > >
> > > Is such a thing possible? I could use it but have been unable to
> figrure
> > > out how to do it.
> > >
> > Rani Sharoni wrote is_abstract_class<T> type trait (see
> > on
> >
>
http://groups.google.com/groups?q=is_abstract_class&hl=en&lr=&ie=UTF-8&oe=UT
>
>
> This class determines whether it is possible to create an array of type
> T. If it is not, and T is not void, a reference, or a function, it
assumes
> that T must be an abstract base class. The problem is that it is
impossible
> to create an array of any type that does not have a public constructor,
for
> instance a non-abstract singleton class. So this does not quite work.

No, the code does not attempt to create an array of T. It only tests whether
it's possible to _declare_ an array of T.


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