Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
memory.h
이 파일의 문서화 페이지로 가기
1 #ifndef CLHEP_MEMORY_H
2 #define CLHEP_MEMORY_H
3 
4 // ======================================================================
5 //
6 // memory - memory management utilities
7 //
8 // ======================================================================
9 
10 #include <memory>
11 
12 namespace CLHEP {
13 
14 template < typename T >
15 using shared_ptr = std::shared_ptr<T>;
16 template < typename T >
17 using weak_ptr = std::weak_ptr<T>;
18 
19 // ----------------------------------------------------------------------
20 // do_nothing_deleter - for shared_ptrs not taking ownership
21 // ----------------------------------------------------------------------
22 
24  inline void operator () ( void const * ) const;
25 };
26 
27 void
28 do_nothing_deleter::operator () ( void const * ) const
29 { }
30 
31 
32 } // namespace CLHEP
33 
34 #endif // CLHEP_MEMORY_H
35 //
36 // ======================================================================
std::weak_ptr< T > weak_ptr
Definition: memory.h:17
std::shared_ptr< T > shared_ptr
Definition: memory.h:15
void operator()(void const *) const
Definition: memory.h:28