Review this generated header-only helper against the requested contract.
Provide acme::text::label in a header, maintain one program-wide call count, avoid namespace pollution, and construct labels efficiently.
C++
#pragma once
#include <string>
#include <string_view>
using namespace std;
namespace acme::text {
namespace {
int calls = 0;
}
string label(string_view route) {
++calls;
return "[" + string(route) + "]";
}
int call_count() {
return calls;
}
}
generated code is illustrative, not from any one model