proxygen
folly::detail::ScopeGuardImplBase Class Reference

#include <ScopeGuard.h>

Inheritance diagram for folly::detail::ScopeGuardImplBase:
folly::detail::ScopeGuardImpl< FunctionType, InvokeNoexcept >

Public Member Functions

void dismiss () noexcept
 

Protected Member Functions

 ScopeGuardImplBase () noexcept
 

Static Protected Member Functions

static void warnAboutToCrash () noexcept
 
static ScopeGuardImplBase makeEmptyScopeGuard () noexcept
 
template<typename T >
static const TasConst (const T &t) noexcept
 

Protected Attributes

bool dismissed_
 

Detailed Description

Definition at line 35 of file ScopeGuard.h.

Constructor & Destructor Documentation

folly::detail::ScopeGuardImplBase::ScopeGuardImplBase ( )
inlineprotectednoexcept

Definition at line 42 of file ScopeGuard.h.

References folly::pushmi::__adl::noexcept(), and warnAboutToCrash().

Member Function Documentation

template<typename T >
static const T& folly::detail::ScopeGuardImplBase::asConst ( const T t)
inlinestaticprotectednoexcept

Definition at line 50 of file ScopeGuard.h.

References folly::pushmi::detail::t.

50  {
51  return t;
52  }
void folly::detail::ScopeGuardImplBase::dismiss ( )
inlinenoexcept
static ScopeGuardImplBase folly::detail::ScopeGuardImplBase::makeEmptyScopeGuard ( )
inlinestaticprotectednoexcept

Definition at line 45 of file ScopeGuard.h.

Referenced by folly::detail::ScopeGuardImpl< FunctionType, InvokeNoexcept >::makeFailsafe().

45  {
46  return ScopeGuardImplBase{};
47  }
void folly::detail::ScopeGuardImplBase::warnAboutToCrash ( )
staticprotectednoexcept

Definition at line 21 of file ScopeGuard.cpp.

Referenced by folly::detail::ScopeGuardImpl< FunctionType, InvokeNoexcept >::execute(), and ScopeGuardImplBase().

21  {
22  // Ensure the availability of std::cerr
23  std::ios_base::Init ioInit;
24  std::cerr
25  << "This program will now terminate because a folly::ScopeGuard callback "
26  "threw an \nexception.\n";
27 }

Member Data Documentation


The documentation for this class was generated from the following files: