I don't know how to explain this:
namespace A
{
struct B
{
static void f()
{
}
};
}
int main()
{
A::B::B::B::B::B::B::B::B::B::B::f();
}
Why could i do :
A::B::B::B::B::B::B::B::B::B::B::f();
I don't understand it why it's happening.
It is due to injected-class-name
inside class B, B
refers to class B
, as B::B
.
so A::B::B
refers to class B
. and so on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With