Wakan Tanka Wakan Tanka - 9 months ago 64
C++ Question

C++ weird syntax spotted in Aruco codes

I have found strange syntax in some of Aruco files:

vector< cv::Mat > thres_images(n_param1);

Seems like
is function, but if yes then what is
vector< cv::Mat >
in front of it? It is not declaration nor definition. Later it is used as array:

thres = thres_images[n_param1 / 2];

PS: full code can be found here


thres_images is a vector and its ctor is passed n_param1 as initial container size. This ctor is referred to as a fill ctor.