Where the acceleration function vec (x, y, z) is defined

I have seen this vec (....) function in many boost libraries. It creates a vector with the values ​​that you place in it, using the template metamaria to perform type inference. For example:

vec(1,2) returns vector<int> filled with 1,2

vec(1.1,2.2,3.3) returns vector<float> filled with 1.1,2.2,3.3

It is really useful for testing, as well as for evaluating the parameters of vectors. But I cannot find the header file in which it is defined, and Googling is Boost veccompletely useless, because obviously you get a million results about the vector class.

Does anyone know where this is defined?

+3
source share
2 answers

Do you mean the boost :: assign library ?

This is not the design you mention, but it is similar.

+2
source

Is Boost.Assign what you are looking for?

+1
source

Source: https://habr.com/ru/post/1794425/


All Articles