libdpf/thirdparty/hedley/test/flags.c
Ryan Henry e4e666f459 Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 14:08:32 -06:00

13 lines
241 B
C

#include "../hedley.h"
enum Foo {
FOO_BAR = 1 << 0,
FOO_BAZ = 1 << 1,
FOO_QUX = 1 << 2
} HEDLEY_FLAGS;
int main(void) {
const enum Foo foo = HEDLEY_FLAGS_CAST(enum Foo, FOO_BAR | FOO_BAZ);
return HEDLEY_STATIC_CAST(int, foo);
}