IBM Support

Using REGISTER_LAYER macro in Rose RealTime cause compilation error C2276

Troubleshooting


Problem

Using REGISTER_LAYER macro IBM Rational Rose® RealTime cause compilation error: '&' : illegal operation on bound member function expression

Cause

In this case the wrong syntax is probably used. The address of the bound member function can't be used in conjuction with the REGISTER_LAYER macro.

Resolving The Problem

Instead of using the address of the bound member function use the address of the unbound member function (e.g. &Foo_Actor::wakeup yields the address of the unbound member function).

Example:
REGISTER_LAYER(&Foo_Actor::waitForEvent,&Foo_Actor::wakeUp,&Foo_Actor::processLoop);


[{"Product":{"code":"SSSHKL","label":"Rational Rose RealTime"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2002.05.20","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

189354301

Document Information

Modified date:
16 June 2018

UID

swg21128102