feat: implement CPP09 C++20 card
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
#include <iostream>
|
||||
struct Guard { Guard() { std::cout << "acquire\n"; } ~Guard() { std::cout << "release\n"; } };
|
||||
void work(bool short_path) { Guard guard; if (short_path) { std::cout << "work=short\n"; return; } std::cout << "work=long\n"; }
|
||||
int main() { work(true); std::cout << "after\n"; }
|
||||
Reference in New Issue
Block a user