use templates for atomic<int> types