TArrayElementsAreCompatible

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

Choose your operating system:

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.