// transaction.h #ifndef INCLUDED_TRANSACTION_H #define INCLUDED_TRANSACTION_H #include typedef uint32_t merchant_city_id_t; struct transaction { union transaction_key { uint64_t packed; struct { uint32_t merchant_city_id; uint16_t client_id; uint16_t year_month; // year << 4 + month }; } key; union { int32_t value; int32_t sum; float normalized; }; }; #endif // INCLUDED_TRANSACTION_H // transaction.h ends here