IBM Support

I need to declare a copy constructor but not define it.

Question & Answer


Question

I need to declare a copy constructor but not define it.

Answer

C++ allows a user to declare a copy constructor but not define it to prevent other classes from doing a copy of the object. Rhapsody forces the user to create a dummy implementation or leave the implementation empty, but either way Rhapsody still generates a definition of the constructor in either the header file or the implementation file.
 
You can do this currently by using the property CG::Class::StandardOperations, along with its supporting properties (see the Properties Reference Guide).
1483AnswerProduct versionPartner ContentInternal ContentCategoryReference IDAuthor

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

10430

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21323721