
ALT A "database alignment chart". The horizontal axis judges items based on how they're accessed, and the vertical one judges items on what they contain. The items are: Must be queryable with a query language, must contain digital data: PostgresSQL is a database Must be queryable with a query language, must contain information: A library is a database Must be queryable with a query language, can contain anything: Battleship is a database Must be queryable with a language, must contain digital data: Excel is a database Must be queryable with a language, must contain information: A senior engineer is a database Must be queryable with any language, can contain anything: Subway checkout counter is a database Queryable in any way, must contain digital information: Dwarf Fortress is a database Queryable in any way, must contain information: A file cabinet is a database Queryable in any way, can contain anything: A fridge is a database

ALT /* * This returns a constant expression while determining if an argument is * a constant expression, most importantly without evaluating the argument. * Glory to Martin Uecker <[email protected]> */ #define __is_constexpr(x) \ (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))

ALT > #define ICE_P(x) (sizeof(int) == sizeof(*(1 ? ((void*)((x) * 0l)) : (int*)1))) Ok, so I can see that (void *)((x)*0l)) turns into NULL when x is an ICE. Fine. So with a constant, we have sizeof( 1 ? NULL : (int *) 1) and the rule is that if one of the sides of a ternary operation with pointers is NULL, the end result is the other type (int *). So yes, the above returns 'sizeof(int)'. And if it is *not* an ICE that first pointer is still of type '(void *)', but it is not NULL. And yes, the type conversion rules for a ternary op with two non-NULL pointers is different, and it now returns "void *". So now the end result is (sizeof(*(void *)(x)), which on gcc is generally *different* from 'int'.

























