Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2003-01-12 12:53:47


"Thorsten Ottosen" <nesotto_at_[hidden]> wrote in message
news:avk23p$1m8$1_at_main.gmane.org...
>
> "Ronald Garcia" <garcia_at_[hidden]> wrote in message
> news:Pine.GSO.4.50.0301090923330.536-100000_at_trillian.osl.iu.edu...
> >
> > IIRC, the array_traits library was pulled off of the boost main page
> > and moved into the sandbox a while ago. What is its current status? Is
> > being actively developed or is it currently in stasis?
>
> I recently looked into the array_traits because I needed it for the
> container algorithms if they should work for
> built.in arrays too. However, after a long time I came to the conclusion
> that they will never work
> on non-conforming compilers like vc6/7. The problem is simply the
inability
> to deduce the array size by this overload:
>
> template< typename T, int sz >
> void foo( T (&a) [sz] );

Ups...I was wrong. The above code compiles fine. So the size()/end()
functions from array traits can be made. The problem
is this:

template< typename C >
struct array_traits;

template< typename C, std::size_t N >
struct array_traits< T[sz] >; // won't work

regards

Thorsten


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