I have a C++ project that I’m upgrading from UE5.3 to UE5.4. Its not compiled from source, just using factory fresh UE5.4
When compiling my project, I’m getting:
UE_5.4\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): error C2760: syntax error: ‘const’ was unexpected here; expected ‘expression’
Its coming from this function inside ImplicitObjectScaled.h:
template<typename T>
const T* UnwrapImplicit(const FImplicitObject& Implicit, FVec3& OutScale, FReal &OutMargin)
{
OutScale = FVec3(1);
OutMargin = FReal(0);
if (const TImplicitObjectScaled<T>* ScaledImplicit = Implicit.template GetObject<TImplicitObjectScaled<T>>())
{
OutScale = ScaledImplicit->GetScale();
OutMargin = ScaledImplicit->GetMargin();
return ScaledImplicit->GetUnscaledObject();
}
else if (const TImplicitObjectInstanced<T>* InstancedImplicit = Implicit.template GetObject<TImplicitObjectInstanced<T>>())
{
OutMargin = InstancedImplicit->GetMargin();
return InstancedImplicit->GetInstancedObject();
}
else if (const T* RawImplicit = Implicit.template GetObject<T>())
{
OutMargin = RawImplicit->GetMargin();
return RawImplicit;
}
else
{
return nullptr;
}
}
Not sure how to get around this or why it would be failing to compile this?