How to expose custom smart pointer?