Changeset 570 for library/bdm/shared_ptr.h
- Timestamp:
- 08/20/09 08:57:55 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/shared_ptr.h
r565 r570 183 183 184 184 /*! 185 \brief const cast 186 187 Shared pointer to T can be converted to shared pointer to 188 const T, just like T * can be converted to T const *. 189 */ 190 template<typename U> 191 operator shared_ptr<const U>() const { 192 shared_ptr<const U> cptr; 193 cptr.refCnt = refCnt; 194 cptr.payload = payload; 195 add_ref(); 196 return cptr; 197 } 198 199 /*! 185 200 \brief Efficient swap for shared_ptr. 186 201 */