x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.16
Tags:
more ▼

asked Jul 24 '17 at 11:50 AM in Bug Reports

avatar image

欧米哥
23 2 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered May 14 '18 at 06:09 PM

avatar image

L4g0
1 2 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question