[boost] A compile-time-counter code snippet for boost