We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d7d488 commit bc7f0a1Copy full SHA for bc7f0a1
libtock/defer.h
@@ -1,5 +1,14 @@
1
#pragma once
2
3
+// Implementation of the C `defer {}` feature.
4
+//
5
+// As of July 2025, upcoming versions of C will support `defer` as a way to run
6
+// code when a value goes out of scope. See:
7
+// https://thephd.dev/_vendor/future_cxx/technical%20specification/C%20-%20defer/C%20-%20defer%20Technical%20Specification.pdf
8
9
+// This implements the same feature with a macro. This implementation used from
10
+// https://gustedt.wordpress.com/2025/01/06/simple-defer-ready-to-use/.
11
+
12
#ifdef __cplusplus
13
extern "C" {
14
#endif
0 commit comments