Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-01-27 13:18:49


"John Maddock" <john_at_[hidden]> wrote in message
news:005801c3e27a$a6c4d1f0$4b580352_at_fuji...
> > I have noticed that is_array and remove_bounds do not seem to work
> > with array types of unknown bounds; e.g.,
> >
> > BOOST_STATIC_ASSERT(!boost::is_array< int[] >::value);
> > BOOST_STATIC_ASSERT((boost::is_same< boost::remove_bounds<
int[]
> > >::type, int[]>::value));
> >
> > compile on GCC 3.2 and VC7.1. Is this the desired behavior?
>
> No, not at all.
>
> Thanks for the patches,

No trouble.

> ... this seems to be a strange corner case: VC7.1
> doesn't need the patches (it does the right thing without them), but
gcc
> does, while Borland doesn't compile the patched version, or do the
right
> thing without the patches... sigh.

That's funny. My installation of VC7.1 defintely doesn't work with the
unpatched version.

>
> Anyway, I've patched the headers and extended the test cases on my
local cvs
> copy, I've got the type traits regression tests running now,
assuming
> everything is OK, then I'll commit your patches when cvs comes back
online.
>

How did the regressions turn out?

BTW, while we're on the subject of remove_bounds, I think the
documentation is slightly misleading. All the remove_xxx traits have a
note under 'compiler requirements' essentially stating that the traits
don't work correctly without partial specialization, 'except as noted
below'. AFAICT, the note refers to the use of the macro
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION; however, this macro
does not provide specializations of remove_bounds (and probably can't,
efficiently). I therefore think it might be appropriate to remove
'except as noted below' from the remove_bounds documentation. I am I
wrong?

Thanks.

Jonathan


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