E2289 __published or __automated sections only supported for Delphi classes (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

The compiler needs to generate a special kind of vtable for classes containing __published and __automated sections. Therefore, these sections are only supported for Delphi style classes. Delphi style classes derive directly or indirectly from System::TObject.


Example:

structregclass
{
int mem;
__published:// Error: no Delphi style class
int __property ip = { read = mem, write = mem };
};
struct__declspec(delphiclass) clxclass
{
int mem;
__published:// OK
int __property ip = { read = mem, write = mem };
};