Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-02-05 08:37:34

John Maddock wrote:
> > I noticed that is_class actually detects classes only for the Metrowerks
> > and the VC++, other compilers use a fall-back implementation which works
> > by detecting everything but classes and thus everything which remains has
> > to be a class. This is IMHO broken as i.e. member functions are detected
> > as classes.
> They shouldn't be, and aren't for other compilers, and in fact the member
> function pointers that are tested in the test suite don't get mis-assigned
> as class types, even with gcc. I accept that there is a problem with gcc
> though because <T U::*> partial specialisations don't pick up member
> function pointers as it should, so we ended up with a long list :-(

Seems I don't understand the current version in detail. Isn't the
fall-back version basically:

is_class =
   !is_union &&
   !is_array &&
   !is_reference &&
   !is_void &&

>From the doc to is_function:

"Evaluates to true only if T is a function type
(note not a reference or pointer to function)."

That given, a member-function-pointer should match is_class, shouldn't
it? In fact all pointers should IMHO match is_class with this
implementation. Maybe it's just me but the boost source is feeling more
and more unmaintainable given the extrem use of MACROs to workaround
each and every problem some compilers have. Am I the only one who feels
uncomfortable with it?

Regards, Daniel

Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web:

Boost list run by bdawes at, gregod at, cpdaniel at, john at