Blaze 3.9
IsView.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TYPETRAITS_ISVIEW_H_
36#define _BLAZE_MATH_TYPETRAITS_ISVIEW_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
46
47
48namespace blaze {
49
50//=================================================================================================
51//
52// CLASS DEFINITION
53//
54//=================================================================================================
55
56//*************************************************************************************************
61template< typename U >
62TrueType isView_backend( const volatile View<U>* );
63
64FalseType isView_backend( ... );
66//*************************************************************************************************
67
68
69//*************************************************************************************************
100template< typename T >
101struct IsView
102 : public decltype( isView_backend( std::declval<T*>() ) )
103{};
104//*************************************************************************************************
105
106
107//*************************************************************************************************
112template< typename T >
113struct IsView<T&>
114 : public FalseType
115{};
117//*************************************************************************************************
118
119
120//*************************************************************************************************
133template< typename T >
134constexpr bool IsView_v = IsView<T>::value;
135//*************************************************************************************************
136
137} // namespace blaze
138
139#endif
Header file for the IntegralConstant class template.
Header file for the View base class.
constexpr bool IsView_v
Auxiliary variable template for the IsView type trait.
Definition: IsView.h:134
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
BoolConstant< false > FalseType
Type/value traits base class.
Definition: IntegralConstant.h:121
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
Compile time check for views.
Definition: IsView.h:103