tr1::shared_ptr constructor insists on its first parameter being a pointer, and 0 isn't a pointer, it's an
int. Yes, it's convertible to a pointer, but that's not good enough in this case;
- 4. Designs and Declarations
- from Effective C++: 55 Specific Ways to Improve Your Programs and Designs, Third Edition
- Publisher: Addison-Wesley Professional
- Released: May 2005
nullptr from C++11 solves this problem.
Share this highlighthttp://www.safaribooksonline.com/a/effective-c-55/2336749/