ITK  4.9.0
Insight Segmentation and Registration Toolkit
itk::DisableIf< TCondition, TType > Struct Template Reference

#include <itkEnableIf.h>

+ Inheritance diagram for itk::DisableIf< TCondition, TType >:
+ Collaboration diagram for itk::DisableIf< TCondition, TType >:

Detailed Description

template<class TCondition, class TType = void>
struct itk::DisableIf< TCondition, TType >

simplified way to dispose of disable_if.

Template Parameters
TConditionCondition type. It's expected to provide a boolean value through its Value member.
TTypeType to return when the TCondition is (a) false (type).

This overload automatically fetches TCondition value. However, beware, it won't work with standard C++ traits or boost traits. Indeed, this enable_if overload expects the value to follow UpperCamelCase ITK naming policy instead of the standard snake_case policy.

Example:

* template< typename TType>
* typename DisableIf<
* mpl::Not_<IsSame<TType, typename NumericTraits<TType>::ValueType>>,
* TType >::Type
* GetComponent(const TType pix,
* unsigned int itkNotUsed( idx ) ) const
* {
* return pix;
* }
*
See Also
EnableIfC
DisableIf

Definition at line 134 of file itkEnableIf.h.


The documentation for this struct was generated from the following file: