value initialization for automatic variables [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: non-copyable objects and value initialization: g++ vs msvc Value-initializing an automatic object? Consider the following statement: It's not really possible to value-initialize an automatic object. Is this statement true? I see no problem in doing this: int main() { int i = int(); } 回答1: The term value-initialization is defined in 8.5 [dcl.init] paragraph 16, 4th bullet: If the initializer is (), the object is