IsSMPAssignable.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISSMPASSIGNABLE_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISSMPASSIGNABLE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 #include <blaze/util/mpl/If.h>
47 #include <blaze/util/mpl/Or.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // CLASS DEFINITION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
63 template< typename T >
64 struct IsSMPAssignableHelper
65 {
66  private:
67  //**struct HasNestedMember**********************************************************************
68  template< typename T2 >
69  struct UseNestedMember { static constexpr bool value = T2::smpAssignable; };
70  //**********************************************************************************************
71 
72  //**struct NoNestedMember***********************************************************************
73  template< typename T2 >
74  struct NotSMPAssignable { static constexpr bool value = false; };
75  //**********************************************************************************************
76 
77  public:
78  //**********************************************************************************************
79  static constexpr bool value = If_< Or< IsVector<T>, IsMatrix<T> >
80  , UseNestedMember<T>
81  , NotSMPAssignable<T>
82  >::value;
83  //**********************************************************************************************
84 };
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
118 template< typename T >
119 struct IsSMPAssignable : public BoolConstant< IsSMPAssignableHelper<T>::value >
120 {};
121 //*************************************************************************************************
122 
123 } // namespace blaze
124 
125 #endif
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the IsMatrix type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Header file for the Or class template.
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsSMPAssignable.h:119
Header file for the IsVector type trait.
Header file for the IntegralConstant class template.