[MultiArray] number of dimensions as static constant

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkpE4poACgkQ5vihyNWuA4VzQgCfcbKVf2y10seFT7M+fAEkAHr9 KkAAniIZCuLumjb2VcVJgDF6BZMtalfb =wyei -----END PGP SIGNATURE-----

Hi Frank, For the MultiArray concept, "A::dimensionality" is what you are looking for. Best, Ron On Jun 26, 2009, at 10:00 AM, Frank Mori Hess wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkpE4poACgkQ5vihyNWuA4VzQgCfcbKVf2y10seFT7M+fAEkAHr9 KkAAniIZCuLumjb2VcVJgDF6BZMtalfb =wyei -----END PGP SIGNATURE----- _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 29 June 2009, Ronald Garcia wrote:
Hi Frank,
For the MultiArray concept, "A::dimensionality" is what you are looking for.
Ah, thanks for cluing me in. The num_dimensions() member is what is used in the code snippets in the reference and I just assumed that was all there was. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkpI2MYACgkQ5vihyNWuA4WB4QCfZf5UE7NngPbQlPfIWex/cPzq lpYAn0UNbWRp7I3CQR/uQarLhI6mMC/X =bEhG -----END PGP SIGNATURE-----
participants (2)
-
Frank Mori Hess
-
Ronald Garcia