Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
#include

int 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