15 #ifndef __Thea_Memory_hpp__ 16 #define __Thea_Memory_hpp__ 24 #define THEA_DECL_SMART_POINTERS(type) \ 25 typedef std::shared_ptr< type > Ptr; \ 26 typedef std::shared_ptr< type const > ConstPtr; \ 27 typedef std::weak_ptr< type > WeakPtr; \ 28 typedef std::weak_ptr< type const > ConstWeakPtr; 31 #ifdef THEA_EXTERN_TEMPLATES 32 # define THEA_DECL_EXTERN_SMART_POINTERS(class_name) \ 34 extern template class shared_ptr<class_name>; \ 35 extern template class shared_ptr<class_name const>; \ 36 extern template class weak_ptr<class_name>; \ 37 extern template class weak_ptr<class_name const>; \ 40 # define THEA_DECL_EXTERN_SMART_POINTERS(class_name) 41 #endif // THEA_EXTERN_TEMPLATES 44 #ifdef THEA_EXTERN_TEMPLATES 45 # define THEA_INSTANTIATE_SMART_POINTERS(class_name) \ 47 template class shared_ptr<class_name>; \ 48 template class shared_ptr<class_name const>; \ 49 template class weak_ptr<class_name>; \ 50 template class weak_ptr<class_name const>; \ 53 # define THEA_INSTANTIATE_SMART_POINTERS(class_name) 54 #endif // THEA_EXTERN_TEMPLATES Root namespace for the Thea library.
T & asLvalue(T &&t)
Convert an r-value to an l-value.