开发者

QPair initialization

开发者 https://www.devze.com 2023-02-19 02:42 出处:网络
When I use the following statement, typedef QPair<ItemA, ItemB> test where ItemB is a smart pointer.ie typ开发者_运维知识库edef QSharedpointer<Z> ItemB

When I use the following statement,

typedef QPair<ItemA, ItemB> test

where ItemB is a smart pointer.ie typ开发者_运维知识库edef QSharedpointer<Z> ItemB

When I instantiate test, should I provide initialization values ? eg: test Inst1(0,0);

Or does QPair automatically provide default constructed values?


I have found the Qt documentation to be very reliable in such low-level matters. And according to the QPair documentation, QPair has a default constructor with no arguments. (Alternatively, you could just have tried it out...)

0

精彩评论

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

关注公众号