开发者

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

I have seen this function vec(....) in many boost libraries. It constructs a vector with the values you place in it using some template meta-magic to do the type inference. So 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

Its really useful for testing as well as for passin开发者_StackOverflow社区g vectors valued parameters. But I can;t find which header file it is defined in, and Googling Boost vec is completely useless because obviously you get a million results about the vector class.

Does any know where it is defined?


Are you you are referring to the boost::assign library?

It not the construction you mention but it is similar.


Is Boost.Assign what you're looking for ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜