chsvlib
chsv helper source code
array_size< T > Struct Template Reference

Calculates a size of a one-dimensional vector. Can be used instead of array_size C macro. More...

Detailed Description

template<class T>
struct Chusov::Math::array_size< T >

Calculates a size of a one-dimensional vector. Can be used instead of array_size C macro.

Template Parameters
Tis a type of the vector.

Usage:

array_size<int[1][2][3]>::value; // is 1
double vec[][3] = {{0.1, 0.2, 0.3}, {0.4, 0.5, 0.6}}; array_size<decltype(vec)>::value; // is 2
#define array_size(x)
Returns a number of elements in an array.
Definition: chsvbase.h:484

The documentation for this struct was generated from the following file: