DxLibEx
dxle::type_traits::ignore_type< typename > Struct Template Reference

Trait class whose value is true regardless of what T is. we can use it, when we want to let SFINAE work for a decltype expressions. More...

#include <ignore.hpp>

Inheritance diagram for dxle::type_traits::ignore_type< typename >:
Collaboration diagram for dxle::type_traits::ignore_type< typename >:

Detailed Description

template<typename>
struct dxle::type_traits::ignore_type< typename >

Trait class whose value is true regardless of what T is. we can use it, when we want to let SFINAE work for a decltype expressions.

template<typename T>
//return int
auto add(int a, T b)->std::enable_if_t<dxle::ignore_type<decltype(a + b)>::value, int>
{
return a + b;
}
int main()
{
add(0, 0);//OK
//add(0, nullptr);//compile error
return 0;
}

Definition at line 40 of file ignore.hpp.


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