CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
32  public:
33  FunctorESHandleExceptionFactory(T&& iFunctor) : m_functor(std::move(iFunctor)) {}
34 
35  std::exception_ptr make() const {
36  return m_functor();
37  }
38  private:
40  };
41 
42  template<typename T>
43  std::shared_ptr<ESHandleExceptionFactory> makeESHandleExceptionFactory(T&& iFunctor) {
44  return std::make_shared<FunctorESHandleExceptionFactory<T>>(std::move(iFunctor));
45  }
46 }
47 #endif
std::shared_ptr< ESHandleExceptionFactory > makeESHandleExceptionFactory(T &&iFunctor)
def move
Definition: eostools.py:510
long double T