LINUX.ORG.RU

История изменений

Исправление fsb4000, (текущая версия) :

а константы они public, а не private. Так как они константы и их никто не может изменить, нет смысла делать их private…

@deep-purple

http://eel.is/c++draft/lex.name#3

In addition, some identifiers are reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required.

Each identifier that contains a double underscore __ or begins with an underscore followed by an uppercase letter is reserved to the implementation for any use.

Each identifier that begins with an underscore is reserved to the implementation for use as a name in the global namespace.

Кстати, clang-tidy это отслеживает: https://gcc.godbolt.org/z/1WcWWe (ругается на _bad как глобальную переменную)

Исправление fsb4000, :

а константы они public, а не private. Так как они константы и их никто не может изменить, нет смысла делать их private…

@deep-purple

http://eel.is/c++draft/lex.name#3

In addition, some identifiers are reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required.

Each identifier that contains a double underscore __ or begins with an underscore followed by an uppercase letter is reserved to the implementation for any use.

Each identifier that begins with an underscore is reserved to the implementation for use as a name in the global namespace.

Кстати, clang-tidy это отслеживает: https://gcc.godbolt.org/z/5fYcda (ругается на _good2 как глобальную переменную)

Исправление fsb4000, :

а константы они public, а не private. Так как они константы и их никто не может изменить, нет смысла делать их private…

@deep-purple

http://eel.is/c++draft/lex.name#3

In addition, some identifiers are reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required.

Each identifier that contains a double underscore __ or begins with an underscore followed by an uppercase letter is reserved to the implementation for any use.

Each identifier that begins with an underscore is reserved to the implementation for use as a name in the global namespace.

Кстати, clang-tidy это отслеживает: https://gcc.godbolt.org/z/Ej43oe (ругается на _good2 как глобальную переменную)

Исходная версия fsb4000, :

а константы они public, а не private. Так как они константы и их никто не может изменить, нет смысла делать их private…

@deep-purple

http://eel.is/c++draft/lex.name#3

In addition, some identifiers are reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required.

Each identifier that contains a double underscore __ or begins with an underscore followed by an uppercase letter is reserved to the implementation for any use.

Each identifier that begins with an underscore is reserved to the implementation for use as a name in the global namespace.