Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
typetraits
IsClearable.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TYPETRAITS_ISCLEARABLE_H_
36
#define _BLAZE_MATH_TYPETRAITS_ISCLEARABLE_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <utility>
44
#include <
blaze/math/typetraits/RemoveAdaptor.h
>
45
#include <
blaze/util/IntegralConstant.h
>
46
#include <
blaze/util/typetraits/IsDetected.h
>
47
48
49
namespace
blaze {
50
51
//=================================================================================================
52
//
53
// CLASS DEFINITION
54
//
55
//=================================================================================================
56
57
//*************************************************************************************************
62
template
<
typename
T >
63
using
Clear_t =
decltype
( std::declval<T&>().clear() );
65
//*************************************************************************************************
66
67
68
//*************************************************************************************************
87
template
<
typename
T >
88
struct
IsClearable
89
:
public
IsDetected
< Clear_t, RemoveAdaptor_t<T> >
90
{};
91
//*************************************************************************************************
92
93
94
//*************************************************************************************************
99
template
<
typename
T >
100
struct
IsClearable
<T&>
101
:
public
FalseType
102
{};
104
//*************************************************************************************************
105
106
107
//*************************************************************************************************
120
template
<
typename
T >
121
constexpr
bool
IsClearable_v
=
IsClearable<T>::value
;
122
//*************************************************************************************************
123
124
}
// namespace blaze
125
126
#endif
IntegralConstant.h
Header file for the IntegralConstant class template.
IsDetected.h
Header file for the IsDetected type trait.
RemoveAdaptor.h
Header file for the RemoveAdaptor type trait.
blaze::IsClearable_v
constexpr bool IsClearable_v
Auxiliary variable template for the IsClearable type trait.
Definition
IsClearable.h:121
blaze::IsDetected
typename DetectedOr< NoneSuch, OP, Ts... >::Value_t IsDetected
Compile time detection of type properties.
Definition
IsDetected.h:151
blaze::FalseType
BoolConstant< false > FalseType
Type/value traits base class.
Definition
IntegralConstant.h:121
blaze::IsClearable
Compile time check for clearable data types.
Definition
IsClearable.h:90
Generated by
1.18.0