Compiler Error C2023
'identifier': Alignment (value-1) different from prior declaration (value-2)
The compiler found an alignment specifier for a class type that's different from a previous declaration, or an enum
alignment specifier that's different from the natural alignment of the base type.
To resolve this error, make sure all declarations and definitions of the type use the same alignment value.
The following sample generates C2023:
// C2023.cpp
class alignas(2) C;
class alignas(4) C {}; // C2023
Possible resolution:
// C2023b.cpp
// compile with: /c
class alignas(2) C;
class alignas(2) C {};
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про