CMS 3D CMS Logo

FunctorESHandleExceptionFactory.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_FunctorESHandleExceptionFactory_h
2 #define FWCore_Framework_FunctorESHandleExceptionFactory_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : FunctorESHandleExceptionFactory
7 //
16 //
17 // Original Author: W. David Dagenhart
18 // Created: 1 May 2014
19 //
20 
22 
23 #include <exception>
24 #include <memory>
25 #include <utility>
26 
27 namespace edm {
28 
29  template <typename T>
31  public:
32  FunctorESHandleExceptionFactory(T&& iFunctor) : m_functor(std::move(iFunctor)) {}
33 
34  std::exception_ptr make() const override { return m_functor(); }
35 
36  private:
38  };
39 
40  template <typename T>
41  std::shared_ptr<ESHandleExceptionFactory> makeESHandleExceptionFactory(T&& iFunctor) {
42  return std::make_shared<FunctorESHandleExceptionFactory<T>>(std::move(iFunctor));
43  }
44 } // namespace edm
45 #endif
std::exception_ptr make() const override
std::shared_ptr< ESHandleExceptionFactory > makeESHandleExceptionFactory(T &&iFunctor)
HLT enums.
long double T
def move(src, dest)
Definition: eostools.py:511