test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
do_nothing_deleter.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_do_nothing_deleter_h
2 #define FWCore_Utilities_do_nothing_deleter_h
3 
4 // ----------------------------------------------------------------------
5 //
6 // do_nothing_deleter.h
7 //
8 // Purpose: do_nothing_deleter provides a way to use std::shared_ptr
9 // or boost::shared_array for those cases where the object or array
10 // may be either in dynamic (heap) storage, or in static storage,
11 // as long as which of these applies is known when the shared_ptr or shared_array
12 // is constructed.
13 //
14 // For objects:
15 //
16 // If the object is allocated in dynamic storage, use
17 // std::shared_ptr<T> (new T(...));
18 
19 // If the object "t" is in static storage, use
20 // std::shared_ptr<T> (&t, do_nothing_deleter());
21 //
22 // For arrays:
23 //
24 // If the array is allocated in dynamic storage, use
25 // boost::shared_array<T> (new T(...)[]);
26 
27 // If the array "t" is in static storage, use
28 // boost::shared_array<T> (t, do_nothing_deleter());
29 //
30 //
31 // ----------------------------------------------------------------------
32 
33 namespace edm {
35  void operator()(void const*) const {}
36  };
37 }
38 
39 #endif
void operator()(void const *) const