PS There is another neat use case where a shared_ptr is allocated. Now we cannot wrap a shared_ptr in an XPtr but ... we can stick the shared_ptr into a struct, and allocate that with new and then make_xptr. You are then back to well-understood C++ semantics. Dirk -- dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org