Add printer for std::weak_ptr

This commit is contained in:
Danilo Piparo 2019-04-30 17:38:50 +02:00 committed by SFT
parent 6d8bac661b
commit 8b9412cb7f

View File

@ -296,6 +296,13 @@ namespace cling {
return "std::shared_ptr -> " + printValue(val->get());
}
// weak_ptr<T>:
template <class T>
inline std::string printValue(std::weak_ptr<T> *val)
{
return "std::weak_ptr -> " + printValue(val->lock().get());
}
}
#endif