Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-31 00:08:50

0001 #ifndef FWCore_Utilities_getAnyPtr_h
0002 #define FWCore_Utilities_getAnyPtr_h
0003 
0004 #include <cassert>
0005 #include <memory>
0006 
0007 namespace edm {
0008   template <typename T>
0009   inline std::unique_ptr<T> getAnyPtr(void *p, int offset) {
0010     return std::unique_ptr<T>(static_cast<T *>(static_cast<void *>(static_cast<unsigned char *>(p) + offset)));
0011   }
0012 }  // namespace edm
0013 
0014 #endif