CMS 3D CMS Logo

make_shared_noexcept_false.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_make_shared_noexcept_false_h
2 #define FWCore_Framework_make_shared_noexcept_false_h
3 #include <memory>
4 namespace edm {
5  template <typename T, typename... Args>
6  std::shared_ptr<T> make_shared_noexcept_false(Args&&... args) {
7 #if defined(__APPLE__)
8  // libc++ from Apple Clang does not allow non-default destructors
9  // in some cases the destructor uses noexcept(false).
10  return std::shared_ptr<T>(new T(std::forward<Args>(args)...));
11 #else
12  return std::make_shared<T>(std::forward<Args>(args)...);
13 #endif
14  }
15 } // namespace edm
16 #endif
std::shared_ptr< T > make_shared_noexcept_false(Args &&...args)
HLT enums.
long double T