Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Macros
SkScopeExit.h File Reference
#include "include/private/base/SkMacros.h"
#include <functional>
#include <utility>

Go to the source code of this file.

Classes

class  SkScopeExit
 

Macros

#define SK_AT_SCOPE_EXIT(stmt)    SkScopeExit SK_MACRO_APPEND_LINE(at_scope_exit_)([&]() { stmt; })
 

Macro Definition Documentation

◆ SK_AT_SCOPE_EXIT

#define SK_AT_SCOPE_EXIT (   stmt)     SkScopeExit SK_MACRO_APPEND_LINE(at_scope_exit_)([&]() { stmt; })

SK_AT_SCOPE_EXIT(stmt) evaluates stmt when the current scope ends.

E.g. { int x = 5; { SK_AT_SCOPE_EXIT(x–); SkASSERT(x == 5); } SkASSERT(x == 4); }

Definition at line 56 of file SkScopeExit.h.

57 { stmt; })