TLazyEnableIf

This is a variant of the above that will determine the return type 'lazily', i.e. only if the function is enabled.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/EnableIf.h

Include

#include "Templates/EnableIf.h"

Syntax

template<bool Predicate, typename Func>
class TLazyEnableIf

Remarks

This is a variant of the above that will determine the return type 'lazily', i.e. only if the function is enabled. This is useful when the return type isn't necessarily legal code unless the enabling condition is true.

This function will only be instantiated if SomeTrait<T>::Value is true for a particular T. The function's return type is typename Transform<T>::Type. template <typename t>=""> typename TLazyEnableIf<SomeTrait<T>::Value, Transform<T>>::Type Function(const T& Obj) { ... }

See boost::lazy_enable_if for more details.

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