RAD Studio |  |

E2242: Specifier requires Delphi style class type (C++)
Example
Collapse All

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

Example
Copy Code

    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!