notifications
Intel Announces Agreement to Acquire Codeplay Software; Expanding our Open Standards Vision. Learn more here.
highlight_off
arrow_back_ios Back to List

Offload1205

Offload KB - offload-library

Old Content Alert

Please note that this is a old document archive and the will most likely be out-dated or superseded by various other products and is purely here for historical purposes.

This virtual or pointer call may fail due to missing suitable entry in domain (declared at %1). This call requires a local 'this' pointer but none of the domain entries where declared with 'this'.

A virtual function is called on a local this pointer, but the domain does not contain any entry of matching signature declared with 'this'. The following example raises this warning:


struct str
{
	virtual void f();
};

void test()
{
	__offload [str::f] //domain declared  with virtual method/outer this
	{
		str v;
		str* ptr = &v;
		ptr->f(); // virtual call with a local this pointer
	}
}

The virtual inside the __offload block will fail because there is no function in the domain with local this pointer. To fix this problem the domain entry str::func needs to be follwed by 'this' keyword. Here is the correct domain [str::func this].