Hey guys,
I’ve been trying to get the CActorFramework (CAF) to work with UE4 for large scale OpenWorld Simulations. Statically compiling the library on windows, linking and and including the necessary files all worked. =) Also creating stand alone projects for CAF alone works as well. My problem arises when i combine CAF and UE4.
What happens is that MSVC (2015) throws a “error C4582 constructor is not implicitly called” and “error C4583 destructor is not implicitly called” when trying to create a basic “caf::actor_system”. These errors generate whenever there is a union with a none-trivial data member. For example:
class MyClass {
MyClass();
~MyClass();
bool isConstructed = false;
union {
ClassType value;
}
}
In these cases MSVC apparently expects for the constructor or destructor of ClassType to be explicitly called. Which makes sense, why it is being called like so for the destructor: (analog for the constructor)
MyClass::~MyClass() {
if(isConstructed)
value.~ClassType();
}
Under normal circumstances, this works, compiles and behaves as expected. However, when done within a UE4 Project the named compiler errors are thrown. I belive this must have something to do with the compiler flags/settings passed to MSVC by the UE4 Project, but I have no clue where to start or what setting could possibly be the reason for this.
Any other ideas why these errors get thrown would be great as well.
Thanks for the help.