Struct forward delcaration

I was using TArray to access material property values, and I forward declared “struct FTextureParameterValue;”, it compiles fine, it works fine, until I try to package the plugin which has this code in it, it failed, and I’ve located this error:

UnrealBuildTool: d:\program files (x86)\epic games\ue_4.16\engine\source\runtime\core\public\Templates/IsTriviallyDestructible.h(13): error C2139: 'FTextureParameterValue': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_trivially_destructible'
UnrealBuildTool: d:\my documents\unreal projects\pluginscpp\plugins\desin\intermediate\build\win64\ue4\inc\desin\desInFunctionLibrary.generated.h(15): note: see declaration of 'FTextureParameterValue'
UnrealBuildTool: d:\program files (x86)\epic games\ue_4.16\engine\source\runtime\core\public\Containers/Array.h(552): note: see reference to class template instantiation 'TIsTriviallyDestructible<FTextureParameterValue>' being compiled
UnrealBuildTool: d:\program files (x86)\epic games\ue_4.16\engine\source\runtime\core\public\Containers/Array.h(551): note: while compiling class template member function 'TArray<FTextureParameterValue,FDefaultAllocator>::~TArray(void)'
UnrealBuildTool: D:\My Documents\Unreal Projects\PluginsCpp\Plugins\desIn\Source\desIn\Public/desInFunctionLibrary.h(15): note: see reference to function template instantiation 'TArray<FTextureParameterValue,FDefaultAllocator>::~TArray(void)' being compiled
UnrealBuildTool: D:\My Documents\Unreal Projects\PluginsCpp\Plugins\desIn\Source\desIn\Public/desInFunctionLibrary.h(15): note: see reference to class template instantiation 'TArray<FTextureParameterValue,FDefaultAllocator>' being compiled

And MSDN actually has documented this compiler error:
Compiler Error C2139

But it works fine before packaging, so I think that’s a bug, I’m currently including “MaterialInstance.h” in my class header file and it solves this packaging error.

I received this error once, and it was because a TArrray did not have all members to be UPROPERTY(). If the TArray is referenced from outside its definition file, this error can occur. This error is a little misleading for me. Hope this bit of info helps.