RAD Studio
ContentsIndex
PreviousUpNext
E2242: Specifier requires Delphi style class type (C++)

The stored, default, and nodefault storage specifiers are only allowed within property declarations of Delphi style class types. 

 

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
};
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!