I read following links :-
object initialized with and without parentheses
types of default constructor
diff b/w value,zero and default intilization
I have some question which i want to clarify.
1) Given a POD class , say :-
class A{
int val;
};
If i create an object of type A.
A obj; // will this call implicitly defined constructor provided by compiler ?
Now as far as my understanding in this case constructor is not called.is it correct?
new A(); // value-initialize A, which is zero-initialization since it's a POD. Now in this case will implicitly defined constructor provided by compiler ? Is there is any role of constructor for zero initializing the object?
If my understanding is wrong , could you please give me an example where implicitly defined defined constructor is not called at all.
Thank you in advance.