1

Possible Duplicate:
Why shared_ptr has an explicit constructor

It baffles me why std::shared_ptr<int> p1(new int(10)); is OK while, while std::shared_ptr<int> p2 = new int(10); fails? I think the two should be constructed in the same way.

Community
  • 1
  • 1
csyangchen
  • 383
  • 1
  • 9

0 Answers0