TArrayElementsAreCompatible

Assume elements are compatible with themselves - avoids problems with generated copy constuctors of arrays of forwarded types, e.g.:

Windows
MacOS
Linux

Type

typedef TOrValue< std::is_same< DestType, std::decay_t< DestType >>::value, TIsConstructible< DestType, SourceType >> TArrayElementsAreCompatible

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/Array.h

Include

#include "Containers/Array.h"

Remarks

Assume elements are compatible with themselves - avoids problems with generated copy constuctors of arrays of forwarded types, e.g.:

struct FThing;

struct FOuter { TArray Arr; // this will cause errors without this workaround };

This should be changed to use std::disjunction and std::is_constructible, and the usage changed to use ::value instead of ::Value, when std::disjunction (C++17) is available everywhere.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss