CMS 3D CMS Logo

getAnyPtr.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_getAnyPtr_h
2 #define FWCore_Utilities_getAnyPtr_h
3 
4 #include <cassert>
5 #include <memory>
6 
7 namespace edm {
8  template <typename T>
9  inline std::unique_ptr<T> getAnyPtr(void *p, int offset) {
10  return std::unique_ptr<T>(static_cast<T *>(static_cast<void *>(static_cast<unsigned char *>(p) + offset)));
11  }
12 } // namespace edm
13 
14 #endif
HLT enums.
std::unique_ptr< T > getAnyPtr(void *p, int offset)
Definition: getAnyPtr.h:9
long double T