Navigation
API > API/Runtime > API/Runtime/Core
A type which wraps a TString parameter but fails (SFINAE) construction if passed a string argument of an incompatible character type. This will allow FString (TString
This is important because of the legacy of UE's string constructors, which takes anything that looks like a string, of any character width, so overloading - say - FString and FUtf8String will cause overload resolution problems.
The argument should be copied/moved into the real TString instance in order to use it, as this type has no string manipulation ability.
This argument is equivalent to a pass-by-value toboth the lvalue/rvalue overload case. Once , and can be converted back to regular const TString&/TString&& overloads once overloading is no longer required.
Example: void Func(TStringOverload
| Name | TStringOverload |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/StringOverload.h |
| Include Path | #include "Containers/StringOverload.h" |
Syntax
template<typename StringType>
struct TStringOverload
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| This Construct allows us to default construct a TStringOverload using {}. | Containers/StringOverload.h | ||
TStringOverload
(
ArgType&& Arg |
Containers/StringOverload.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CharType | typename StringType::ElementType | Containers/StringOverload.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| String | StringType | Containers/StringOverload.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
StringType && MoveTemp() |
Containers/StringOverload.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool IsValidArgType() |
Containers/StringOverload.h |