Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
typetraits
IsShrinkable.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TYPETRAITS_ISSHRINKABLE_H_
36
#define _BLAZE_MATH_TYPETRAITS_ISSHRINKABLE_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
ShrinkToFit_t =
decltype
( std::declval<T&>().shrinkToFit() );
65
//*************************************************************************************************
66
67
68
//*************************************************************************************************
87
template
<
typename
T >
88
struct
IsShrinkable
89
:
public
IsDetected
< ShrinkToFit_t, RemoveAdaptor_t<T> >
90
{};
91
//*************************************************************************************************
92
93
94
//*************************************************************************************************
99
template
<
typename
T >
100
struct
IsShrinkable
<T&>
101
:
public
FalseType
102
{};
104
//*************************************************************************************************
105
106
107
//*************************************************************************************************
120
template
<
typename
T >
121
constexpr
bool
IsShrinkable_v
=
IsShrinkable<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::IsShrinkable_v
constexpr bool IsShrinkable_v
Auxiliary variable template for the IsShrinkable type trait.
Definition
IsShrinkable.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::IsShrinkable
Compile time check for shrinkable data types.
Definition
IsShrinkable.h:90
Generated by
1.18.0