Blaze 3.9
Loading...
Searching...
No Matches
IsResizable.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TYPETRAITS_ISRESIZABLE_H_
36#define _BLAZE_MATH_TYPETRAITS_ISRESIZABLE_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
49#include <blaze/util/Types.h>
50
51
52namespace blaze {
53
54//=================================================================================================
55//
56// CLASS DEFINITION
57//
58//=================================================================================================
59
60//*************************************************************************************************
65template< typename T >
66using Resizable1_t = decltype( std::declval<T&>().resize( std::declval<size_t>() ) );
68//*************************************************************************************************
69
70
71//*************************************************************************************************
76template< typename T >
77using Resizable2_t = decltype( std::declval<T&>().resize( std::declval<size_t>(), std::declval<size_t>() ) );
79//*************************************************************************************************
80
81
82//*************************************************************************************************
101template< typename T >
103 : public BoolConstant< ( IsVector_v<T> && IsDetected_v< Resizable1_t, RemoveAdaptor_t<T> > ) ||
104 ( IsMatrix_v<T> && IsDetected_v< Resizable2_t, RemoveAdaptor_t<T> > ) >
105{};
106//*************************************************************************************************
107
108
109//*************************************************************************************************
114template< typename T >
115struct IsResizable<T&>
116 : public FalseType
117{};
119//*************************************************************************************************
120
121
122//*************************************************************************************************
135template< typename T >
137//*************************************************************************************************
138
139} // namespace blaze
140
141#endif
Header file for the IntegralConstant class template.
Header file for the IsDetected type trait.
Header file for the IsMatrix type trait.
Header file for the IsVector type trait.
Header file for the RemoveAdaptor type trait.
constexpr bool IsResizable_v
Auxiliary variable template for the IsResizable type trait.
Definition IsResizable.h:136
BoolConstant< false > FalseType
Type/value traits base class.
Definition IntegralConstant.h:121
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition IntegralConstant.h:110
Compile time check for resizable data types.
Definition IsResizable.h:105
Header file for basic type definitions.