E2242 Specifier requires Delphi style class type (i.e. class marked __declspec(delphiclass) or derived from System::TObject) (C++)
Go Up to Compiler Errors And Warnings (C++) Index
The stored, default, and nodefault storage specifiers are only allowed within property declarations of Delphi style class types. Delphi style classes derive directly or indirectly from System::TObject.
Example:
struct regclass { int __property ip1 = { stored = false }; // Error int __property ip2 = { default = 42 }; // Error int __property ip3 = { nodefault }; // Error }; struct __declspec(delphiclass) clxclass { int __property ip1 = { stored = false }; // OK int __property ip2 = { default = 42 }; // OK int __property ip3 = { nodefault }; // OK };