LibreOffice Module onlineupdate (master) 1
|
EnableIf is a struct containing a typedef of T if and only if B is true. More...
#include <TypeTraits.h>
EnableIf is a struct containing a typedef of T if and only if B is true.
mozilla::EnableIf<true, int>::Type is int; mozilla::EnableIf<false, int>::Type is a compile-time error.
Use this template to implement SFINAE-style (Substitution Failure Is not An Error) requirements. For example, you might use it to impose a restriction on a template parameter:
template<typename T> class PodVector // vector optimized to store POD (memcpy-able) types { EnableIf<IsPod<T>::value, T>::Type* vector; size_t length; ... };
Definition at line 1087 of file TypeTraits.h.