The syntax T object(); does not initialize an object; it declares a function that takes no arguments and returns T. The way to value-initialize a named variable before C++11 was T object = T();, which value-initializes a temporary and then copy-initializes the object: most compilers optimize out the copy in this case.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

参照は値初期化することはできません.

Original:

References cannot be value-initialized.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.