I would like to have a variable of the same type as the class it is in. I don't want to use a pointer. I want it to be static AND a const. I have not found a way to do this. I also want an identifier for it.
When I used a pointer, I got a supposed "memory leak".
What I want:
class A {
std::string str;
A(std::string str) : str(str)
{}
static const A b("hi");
}