sun::semantic_analysis::SemanticContext::ScopeSwitchGuard
struct · Source (opens in a new tab)
struct sun::semantic_analysis::SemanticContext::ScopeSwitchGuardMake target the current scope for the enclosed block (restored on exit, including by exception).
Generic instantiation uses it to analyze a template's body in the scope the template was declared in.
Public Functions
ScopeSwitchGuard
ScopeSwitchGuard(const ScopeSwitchGuard &)=delete
public · function · Source (opens in a new tab)
sun::semantic_analysis::SemanticContext::ScopeSwitchGuard::ScopeSwitchGuard(const ScopeSwitchGuard &)=deleteTemporarily switches semantic lookup to another scope.
ScopeSwitchGuard(SemanticContext &c, SemanticScope *target)
public · function · Source (opens in a new tab)
sun::semantic_analysis::SemanticContext::ScopeSwitchGuard::ScopeSwitchGuard(SemanticContext &c, SemanticScope *target)Temporarily switches semantic lookup to another scope.
Related: SemanticContext, SemanticScope
operator=
public · function · Source (opens in a new tab)
ScopeSwitchGuard & sun::semantic_analysis::SemanticContext::ScopeSwitchGuard::operator=(const ScopeSwitchGuard &)=deleteDisallows assignment so ownership and object identity cannot be duplicated.
Related: ScopeSwitchGuard
~ScopeSwitchGuard
public · function · Source (opens in a new tab)
sun::semantic_analysis::SemanticContext::ScopeSwitchGuard::~ScopeSwitchGuard()Restores the semantic scope active before the guard was created.
Public Fields
ctx
public · variable · Source (opens in a new tab)
SemanticContext& sun::semantic_analysis::SemanticContext::ScopeSwitchGuard::ctxNo documentation comment.
Related: SemanticContext
saved
public · variable · Source (opens in a new tab)
SemanticScope* sun::semantic_analysis::SemanticContext::ScopeSwitchGuard::savedNo documentation comment.
Related: SemanticScope