代码搜索:enum

找到约 10,000 项符合「enum」的源代码

代码结果 10,000
www.eeworm.com/read/470720/1447140

c enum1.c

// Build don't link: // GROUPS passed enums class foo { public: enum bar { baz = 1, bat = 7 }; }; class derv : public foo { }; int main() { foo::bar x = foo::baz; derv::bar y = derv::bat; }
www.eeworm.com/read/470720/1447538

c enum1.c

// Build don't link: // Warn if a enum cannot fit into a small bit-field. enum TypeKind { ATK, BTK, CTK, DTK } ; struct Type { enum TypeKind kind : 1; // WARNING - void setBTK(); }; void Type
www.eeworm.com/read/470720/1447763

c enum2.c

// Build don't link: enum tristate { no = -1, maybe, yes }; void foobar () { tristate var = no; // gets bogus error }
www.eeworm.com/read/470720/1447783

c enum3.c

// Build don't link: // Special g++ Options: -Wall enum tristate { no = -1, maybe, yes }; tristate tristate_satisfies (register tristate const t1, register tristate const t2) { switch (t1) {
www.eeworm.com/read/470720/1447848

c enum6.c

// Special g++ Options: -fshort-enums #include enum A { a1 = 0x7fffffff }; enum B { b1 = 0x80000000 }; enum C { c1 = -1, c2 = 0x80000000 }; enum D { d1 = CHAR_MIN, d2 = CHAR_MAX }; enum E
www.eeworm.com/read/470720/1447865

c enum8.c

// Bug: the switch fails on the Alpha because folding ef - 1 fails. enum foo { one=1, thirty=30 }; int f (enum foo ef) { switch (ef) { case one: case thirty: return 0; defaul
www.eeworm.com/read/470720/1447866

c enum4.c

// Build don't link: // Special g++ Options: -Wall enum tristate { no = -1, maybe, yes }; tristate definite_tristate (int truth) { return (truth) ? yes : no; }
www.eeworm.com/read/470720/1447899

c enum7.c

// Yet Another testcase for signed/unsigned enums. // Build don't link: enum A { AA = 0, AB = 1}; enum B { BA = -1, BB = 1}; void set(int a); void set(long a); void foo() { set(AA); // gets bogus
www.eeworm.com/read/470720/1448054

c enum5.c

enum { a = 1 }; int main(void) { int l = -1; return ! (l < a); // testcase fails if a is unsigned }
www.eeworm.com/read/470720/1450235

c enum-1.c

typedef enum { END = -1, EMPTY = (1