Handle Type Conversion

Hi guys,

I have an issue. The codes are:

Handle(IGESData_IGESEntity) igesEntity = Handle(IGESData_IGESEntity)::DownCast(aList->Value(j));

if (aReader.TransferEntity(igesEntity))

TransferEntity take "const Handle(Standard_Transient)" as input argument. But the compiler complains:

no suitable user-defined conversion from "opencascade::handle<IGESData_IGESEntity> to "const opencascade::handle<Standard_Transient>" exists.

Based on C++ definition, it should work.

Could anyone please tell me how to resolve this issue?

Thank you.



renyu_teng's picture

solved. I should add the include file.

#include <IGESData_IGESEntity.hxx>