sun::semantic_analysis::SemanticContext::LifetimeScopeGuard
class · Source (opens in a new tab)
class sun::semantic_analysis::SemanticContext::LifetimeScopeGuardRestores lifetime binders and receiver permission on every exit path.
Public Functions
LifetimeScopeGuard
LifetimeScopeGuard(const LifetimeScopeGuard &)=delete
public · function · Source (opens in a new tab)
sun::semantic_analysis::SemanticContext::LifetimeScopeGuard::LifetimeScopeGuard(const LifetimeScopeGuard &)=deleteA lifetime scope has exactly one owner responsible for restoration.
LifetimeScopeGuard(SemanticContext &context, std::optional< bool > allowThis=std::nullopt, bool isolate=false)
public · function · Source (opens in a new tab)
sun::semantic_analysis::SemanticContext::LifetimeScopeGuard::LifetimeScopeGuard(SemanticContext &context, std::optional< bool > allowThis=std::nullopt, bool isolate=false)Extend the current bindings, or isolate a global initializer from them.
Related: SemanticContext, Extend
operator=
public · function · Source (opens in a new tab)
LifetimeScopeGuard & sun::semantic_analysis::SemanticContext::LifetimeScopeGuard::operator=(const LifetimeScopeGuard &)=deletePrevent duplicate restoration through assignment.
Related: LifetimeScopeGuard
~LifetimeScopeGuard
public · function · Source (opens in a new tab)
sun::semantic_analysis::SemanticContext::LifetimeScopeGuard::~LifetimeScopeGuard()Restore the enclosing declaration's bindings, including after errors.
Private Fields
allowThis_
private · variable · Source (opens in a new tab)
bool sun::semantic_analysis::SemanticContext::LifetimeScopeGuard::allowThis_No documentation comment.
ctx_
private · variable · Source (opens in a new tab)
SemanticContext& sun::semantic_analysis::SemanticContext::LifetimeScopeGuard::ctx_No documentation comment.
Related: SemanticContext
isolated_
private · variable · Source (opens in a new tab)
bool sun::semantic_analysis::SemanticContext::LifetimeScopeGuard::isolated_No documentation comment.
mark_
private · variable · Source (opens in a new tab)
size_t sun::semantic_analysis::SemanticContext::LifetimeScopeGuard::mark_No documentation comment.
savedNames_
private · variable · Source (opens in a new tab)
std::vector<std::string> sun::semantic_analysis::SemanticContext::LifetimeScopeGuard::savedNames_No documentation comment.