APAR status
Closed as program error.
Error description
for templates it only works if both CG:Class:...Declaration and CG:Class:...Definition are defined, whereas for simple classes CG:Class:...Declaration is sufficient to get the declaration generated. As consequence, it still does not work for us, becaus e we want to use it for the declaration of forbidden operations, for which we have set Subject CG Metaclass Class Property NoImplicitAssignDeclaration MultiLine 'private: $Nam e? operator=(const $Name? right); // No implicit assignment oper ator' Property NoImplicitCopyDeclaration MultiLine 'private: $Nam e(const $Name? right); // No implicit copy constructor' Property NoImplicitCtorDeclaration MultiLine 'private: $Nam e(); // No implicit default constructor' end end If we define the definition, too, e.g. Property NoImplicitCtorDefinition MultiLine 'blah' then the declarations are being generated correctly. However, th en also an invalid implementation is generated: //#[ ignore template ?class T? blah //#]
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * **************************************************************** * RECOMMENDATION: * **************************************************************** Incorrect code generated when using standard operations with C++ templates.
Problem conclusion
In 7.5.2.1, a new keyword, $NameWithTemplateParams, was added for use in the declaration and definition properties for standard operations. Use of this keyword is demonstrated in the following property definitions, which can be used to generate template-compatible copy constructors. Subject CG Metaclass Class Property CopyCtorDeclaration MultiLine "$Name(const $NameWithTemplateParams ? x);" Property CopyCtorDefinition MultiLine "$NameWithTemplateParams::$Name(const $NameWithTemplateParams ? x) { /* some code */ }" end
Temporary fix
Comments
APAR Information
APAR number
PM05682
Reported component name
TLOGIC RHAPSODY
Reported component ID
5724V74RP
Reported release
740
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2010-01-21
Closed date
2010-10-14
Last modified date
2010-10-14
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
TLOGIC RHAPSODY
Fixed component ID
5724V74RP
Applicable component levels
R740 PSN
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Document Information
Modified date:
14 October 2010