Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2003-02-15 06:45:10


> After thinking about it longer, I still think that there is a problem. The
> code seems "twisted" to me. Let me try to explain it, I start by some
> observations (all for the case of
> BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION not being set):
>
> is_scalar is based on 3.9/10, which says that enums are scalars.
> Currently, is_scalar doesn't detect enums.

Oh yes it does :-)

template <typename T>
struct is_scalar_impl
{
   BOOST_STATIC_CONSTANT(bool, value =
      (::boost::type_traits::ice_or<
         ::boost::is_arithmetic<T>::value,
         ::boost::is_enum<T>::value,
         ::boost::is_pointer<T>::value,
         ::boost::is_member_pointer<T>::value
>::value));
};

> is_class needs is_scalar

Oh no it doesn't :-)

> is_enum needs is_class or it will detect classes which are convertible to
> int as enums.

Oh no it doesn't :-)
 
still smilingly yours ;-)
John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


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