Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kbinani/defer
`defer` for C++, like Swift
https://github.com/kbinani/defer
Last synced: 8 days ago
JSON representation
`defer` for C++, like Swift
- Host: GitHub
- URL: https://github.com/kbinani/defer
- Owner: kbinani
- License: mit
- Created: 2024-01-02T11:07:20.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-02T15:52:37.000Z (10 months ago)
- Last Synced: 2024-01-03T15:54:42.754Z (10 months ago)
- Language: C++
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# defer
`defer` for C++, like Swift
[![CI](https://github.com/kbinani/defer/actions/workflows/main.yml/badge.svg)](https://github.com/kbinani/defer/actions/workflows/main.yml)
# example
```c++
#include
#includeint main() {
defer {
std::cout << 3 << std::endl;
};
defer {
std::cout << 2 << std::endl;
};
std::cout << 0 << std::endl;
{
defer {
std::cout << 1 << std::endl;
};
}
return 0;
}
```# license
- MIT