# Error: an undefined class is not allowed as an argument to compiler intrinsic type trait '\_\_is\_trivially\_destructible'

**URL:** <https://forums.unrealengine.com/t/error-an-undefined-class-is-not-allowed-as-an-argument-to-compiler-intrinsic-type-trait-is-trivially-destructible/405074>\
**Category:** C++\
**Tags:** tarray:-arrays-in-un, unreal-engine, CPP, question\
**Created:** [September 20, 2017, 7:12pm UTC](https://forums.unrealengine.com/t/error-an-undefined-class-is-not-allowed-as-an-argument-to-compiler-intrinsic-type-trait-is-trivially-destructible/405074 "2017-09-20T19:12:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_07ba773b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_07ba773b](https://forums.unrealengine.com/u/anonymous_user_07ba773b)\
**Post date:** [September 20, 2017, 7:12pm UTC](https://forums.unrealengine.com/t/error-an-undefined-class-is-not-allowed-as-an-argument-to-compiler-intrinsic-type-trait-is-trivially-destructible/405074/1 "2017-09-20T19:12:17Z")

</div>

I’m getting an error I don’t understand.

I have a struct called **FLilaParameter** , which I have defined in a file called **LilaStructsAndEnums.h** :

```
LilaStructsAndEnums.h

USTRUCT(BlueprintType)
struct FLilaParameter
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FName ParameterName;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		float Value;

	FLilaParameter()
	{
		ParameterName = TEXT("ParameterName");
		Value = 0.0f;
	}

	FLilaParameter(FName _ParameterName, float _Value)
	{
		ParameterName = _ParameterName;
		Value = _Value;
	}
};

```

…

In another class called LilaBrushDynamic, I want to have an array of these structs. Here is the code for that class:

…

```
LilaBrushDynamic.h

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "LilaBrushDynamic.generated.h"

struct FLilaParameter;

UCLASS()
class LILA_API ALilaBrushDynamic : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	ALilaBrushDynamic();

	TArray<FLilaParameter> ParametersArray;

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

};

```

When I try to build, I get the following error:

**Error C2139 ‘FLilaParameter’: an undefined class is not allowed as an argument to compiler intrinsic type trait ‘\_\_is\_trivially\_destructible’  
C:\Program Files (x86)\Epic Games\UE\_4.17\Engine\Source\Runtime\Core\Public\Templates\IsTriviallyDestructible.h 18**

What’s going on here? Why can’t I have an array of this struct that has been defined?

---

<div class="post-metadata">

**Author:** ![Stan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stan](https://forums.unrealengine.com/u/Stan)\
**Post date:** [January 25, 2018, 8:40pm UTC](https://forums.unrealengine.com/t/error-an-undefined-class-is-not-allowed-as-an-argument-to-compiler-intrinsic-type-trait-is-trivially-destructible/405074/2 "2018-01-25T20:40:16Z")

</div>

Include LilaStructsAndEnums.h file instead of declaing it in LilaBrushDynamic line 9

---

<div class="post-metadata">

**Author:** ![Deathhero1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deathhero1](https://forums.unrealengine.com/u/Deathhero1)\
**Post date:** [July 6, 2025, 1:15pm UTC](https://forums.unrealengine.com/t/error-an-undefined-class-is-not-allowed-as-an-argument-to-compiler-intrinsic-type-trait-is-trivially-destructible/405074/3 "2025-07-06T13:15:04Z")

</div>

This saved me after hours of headache, 7 years later. Stan you are truly the GOAT
