Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 2000-06-22 15:55:44


Sure, how about ct_size for a name then.

David Abrahams writes:
> Good suggestion, but let's reserve ALL_CAPS names for preprocessor macros,
> OK?
> Thanks,
> Dave
> ----- Original Message -----
> From: <jsiek_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Wednesday, June 21, 2000 2:35 PM
> Subject: [boost] array formal review
>
>
> >
> > I often find it usefull to be able to access the array size at
> > compile-time, even when the array is coming in as a plain template
> > argument. Therefore it would be nice to have an enum that provides
> > public access to N.
> >
> > template<class T, std::size_t N>
> > class array {
> > public:
> > enum { SIZE = N };
> >
> > ...
> > };
> >
> >
> > Note, this can also be done with a static const int... but there are
> > some comiler (VC++) portability issues.
> >
> > Cheers,
> >
> > Jeremy
>
>
>
> ------------------------------------------------------------------------
> SALESFORCE.COM MAKES SOFTWARE OBSOLETE
> Secure, online sales force automation with 5 users FREE for 1 year!
> http://click.egroups.com/1/2658/4/_/9351/_/961644151/
> ------------------------------------------------------------------------
>
>
>


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