Opened 13 years ago
Last modified 11 years ago
#3223 new Feature Requests
number of dimensions as static constant
Reported by: | fhess | Owned by: | Ronald Garcia |
---|---|---|---|
Milestone: | Boost 1.40.0 | Component: | multi_array |
Version: | Boost 1.39.0 | Severity: | Problem |
Keywords: | Cc: |
Description
multi_array and friends should provide the number of dimensions as a static member constant, so it is available at compile time and can be used in generic programming. I assume the num_dimensions() non-static member function was put in the design with the idea that the number of dimensions of a multi_array object might be dynamically changed. But since the multi array concept and classes doen't support changing the number of dimensions, it doesn't provide anything useful over a static constant.
Note:
See TracTickets
for help on using tickets.
As was pointed out to me on the mailing list, the number of dimensions is available as the member constant "dimensionality". However, this is only documented in the MultiArray concept. It is missing from the synopses of the multi_array classes in the reference documentation.