Consider the following simple example:
struct A
{
int a;
A(int b);
};
A *p;
A::A(int b) : a(b)
{
p = this;
std::cout << "A()" << std::endl;
}
int main()
{
A(10); //What is it?
std::cout << p -> a << std::endl; //10
}
I'm not sure that N3797::8.5 [dcl.init]
may be applied here, because N3797::8.5/1 [dcl.init]
says:
A declarator can specify an initial value for the identifier being declared. The identifier designates a variable being initialized
In the case there is no declartor. Which means that rule is not applicable.
If it's just a constructor call where does it specify int the Standard that expression of the form class-name(argument_list)
allocate a fit amount of memory (What allocation function takes over that?) and initialize an object? I wish to acquire more details about how such expressions work?