Информация об изменениях

Сообщение Re[2]: Впал в ступор увидев такое от 16.03.2019 13:12

Изменено 16.03.2019 13:13 Croessmah

Re[2]: Впал в ступор увидев такое
Здравствуйте, rg45, Вы писали:

R>Не уверен на счет корректности автоинициализации, как здесь
Автор: Croessmah
Дата: 16.03.19


А что Вас смущает? Объект занят самокопированием. Синтаксически здесь всё корректно.

6.3.2 Point of declaration
1. The point of declaration for a name is immediately after its complete declarator (Clause 11) and before its
initializer (if any), except as noted below. [ Example:

unsigned char x = 12;
{ unsigned char x = x; }


2. Here the second x is initialized with its own (indeterminate) value. —end example ]

[ Note: A name from an outer scope remains visible up to the point of declaration of the name that hides it.
[ Example:
const int i = 2;
{ int i[i]; }

declares a block-scope array of two integers. —end example ] —end note ]

Re[2]: Впал в ступор увидев такое
Здравствуйте, rg45, Вы писали:

R>Не уверен на счет корректности автоинициализации, как здесь
Автор: Croessmah
Дата: 16.03.19


А что Вас смущает? Объект занят самокопированием. Синтаксически здесь всё корректно.

6.3.2 Point of declaration
1. The point of declaration for a name is immediately after its complete declarator (Clause 11) and before its
initializer (if any), except as noted below. [ Example:

unsigned char x = 12;
{ unsigned char x = x; }


Here the second x is initialized with its own (indeterminate) value. —end example ]