https://github.com/webfreak001/easyenum
Easily handle long enum names for operations. Written in 20 lines (including unittests)
https://github.com/webfreak001/easyenum
Last synced: 5 months ago
JSON representation
Easily handle long enum names for operations. Written in 20 lines (including unittests)
- Host: GitHub
- URL: https://github.com/webfreak001/easyenum
- Owner: WebFreak001
- Created: 2015-11-30T22:11:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-30T22:16:10.000Z (over 10 years ago)
- Last Synced: 2025-02-28T14:48:10.116Z (over 1 year ago)
- Language: D
- Size: 0 Bytes
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# easyenum
Easily handle long enum names for operations. Written in 20 lines (including unittests)
## Usage
```d
import easyenum;
enum WindowCreationButtonFlags
{
Minimize = 1,
Maximize = 2,
Close = 4
}
auto flags = w!(WindowCreationButtonFlags, q{Minimize | Close});
assert(flags == (WindowCreationButtonFlags.Minimize | WindowCreationButtonFlags.Close));
```