std::shared_ptr have an implicit constructor just for this purpose to make code simpler (without a typedef it would be odd to always write "return std::shared_ptr<Cursor>();") constexpr shared_ptr( std::nullptr_t ); http://reviews.llvm.org/D10932