1

When I use the following statement,

typedef QPair<ItemA, ItemB> test

where ItemB is a smart pointer.ie typedef 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?

demonplus
  • 5,613
  • 12
  • 49
  • 68
Vij
  • 27
  • 1
  • 7

1 Answers1

2

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...)

John_West
  • 2,239
  • 4
  • 24
  • 44
TonyK
  • 16,761
  • 4
  • 37
  • 72