CLHEP
2.4.7.1
C++ Class Library for High Energy Physics
CLHEP
Utility
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
14
namespace
CLHEP
{
15
16
template
<
typename
T >
17
using
shared_ptr
= std::shared_ptr<T>;
18
template
<
typename
T >
19
using
weak_ptr
= std::weak_ptr<T>;
20
21
// ----------------------------------------------------------------------
22
// do_nothing_deleter - for shared_ptrs not taking ownership
23
// ----------------------------------------------------------------------
24
25
struct
do_nothing_deleter
{
26
inline
void
operator ()
(
void
const
* )
const
;
27
};
28
29
void
30
do_nothing_deleter::operator ()
(
void
const
* )
const
31
{ }
32
33
34
}
// namespace CLHEP
35
36
#endif
// CLHEP_MEMORY_H
37
//
38
// ======================================================================
defs.h
CLHEP
Definition
ClhepVersion.h:13
CLHEP::shared_ptr
std::shared_ptr< T > shared_ptr
Definition
memory.h:17
CLHEP::weak_ptr
std::weak_ptr< T > weak_ptr
Definition
memory.h:19
CLHEP::do_nothing_deleter
Definition
memory.h:25
CLHEP::do_nothing_deleter::operator()
void operator()(void const *) const
Definition
memory.h:30
Generated by
1.13.1