Boost logo

Boost :

From: nee Spangenberg (dsp_at_[hidden])
Date: 2003-12-04 04:00:47


Douglas Paul Gregor schrieb:

> It's nearly identical to boost::array, IIRC:
> http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1548.htm

Tiny nitpick: I am wondering, why the current official proposal still misses
any access to the size_t template parameter. I remember that older (non-official)
proposals to such a thingee used something like

template <class T, size_t N >
struct array {
  static const size_t static_size = N;
  ...
};

which would make generic programming much easier (think of integral
constant expressions), and is also a valuable part of the boost snapshot,
I am using.

Anyway, TMHO a static member like array<>::static_size would also
give some more symmetry to existing typedefs for the type template
parameter and it would nearly cost nothing.

Something related to that I also wonder why std::bitset does also do not
provide a similar static member to its nontype size_t template parameter.
(Maybe I should ask for it in comp.lang.c++.mod or comp.std.c++??)

Greetings from Bremen,

Daniel


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