RealDocs

TOptional::Super

property Core Since unknown
#include "Misc/Optional.h"
Access: private

Description

Private type alias for the base class TOptionalBase<OptionalType>, present only on compilers that do not support constrained destructors. It lets TOptional forward IsSet() and DestroyValue() to the base via using declarations.

Caveats & Gotchas

  • Super only exists when PLATFORM_COMPILER_SUPPORTS_CONSTRAINED_DESTRUCTORS is false. On modern compilers (MSVC 2022+, Clang 16+, GCC 13+) the base class is omitted entirely and Super is not declared.
  • This is a private implementation detail used internally by `using Super::IsSet;` and `using Super::DestroyValue;`. It is not part of the public interface and should not be referenced in user code.

Signature

using Super = UE::Core::Private::TOptionalBase<OptionalType>

Example

How Super is used inside TOptional (engine source pattern) C++
// Inside TOptional (compiler without constrained destructors):
// using Super = UE::Core::Private::TOptionalBase<OptionalType>;
// using Super::IsSet;        // exposes base IsSet() as public
// using Super::DestroyValue; // exposes base DestroyValue() privately

// User code never references Super directly.

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.