CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
memory.h
Go to the documentation of this file.
1#ifndef CLHEP_MEMORY_H
2#define CLHEP_MEMORY_H
3
4// ======================================================================
5//
6// memory - memory management utilities
7//
8// ======================================================================
9
10#include "CLHEP/Utility/defs.h"
11
12#include <memory>
13
14namespace CLHEP {
15
16template < typename T >
17using shared_ptr = std::shared_ptr<T>;
18template < typename T >
19using weak_ptr = std::weak_ptr<T>;
20
21// ----------------------------------------------------------------------
22// do_nothing_deleter - for shared_ptrs not taking ownership
23// ----------------------------------------------------------------------
24
26 inline void operator () ( void const * ) const;
27};
28
29void
31{ }
32
33
34} // namespace CLHEP
35
36#endif // CLHEP_MEMORY_H
37//
38// ======================================================================
std::weak_ptr< T > weak_ptr
Definition: memory.h:19
std::shared_ptr< T > shared_ptr
Definition: memory.h:17
void operator()(void const *) const
Definition: memory.h:30