Template within template: why “`>>' should be `> >' within a nested template argument list”

前端 未结 8 1378
无人及你
无人及你 2020-11-28 10:40

I know that when we are using template inside another template, we should write it like this:

vector > s;

and if we wr

8条回答
  •  春和景丽
    2020-11-28 11:23

    Sometimes you want it to be >>. Consider

    boost::array>2> x;
    

    In C++03 this successfully parses and creates an array of size 256.

提交回复
热议问题