EnableIf Structure

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at EnableIf Structure.

Supports the WRL infrastructure and is not intended to be used directly from your code.

template <  
   bool b,  
   typename T = void  
>  
  
struct EnableIf;  
template <  
   typename T  
>  
struct EnableIf<true, T>;  

Parameters

T
A type.

b
A Boolean expression.

Defines a data member of the type specified by the second template parameter if the first template parameter evaluates to true.

Public Typedefs

NameDescription
typeIf template parameter b evaluates to true, the partial specialization defines data member type to be of type T.

EnableIf

Header: internal.h

Namespace: Microsoft::WRL::Details

Microsoft::WRL::Details Namespace

Show: