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