#include <print>
struct Logger {
// a reference member must be set in the initializer list
int& counter;
explicit Logger(int& c) : counter(c) {}
void tick() {
++counter;
}
};
int main() {
int hits = 0;
Logger log{hits};
log.tick();
log.tick();
std::println("{}", hits);
}bind an alias inside a struct