Adaptor.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_CONSTRAINTS_ADAPTOR_H_
36 #define _BLAZE_MATH_CONSTRAINTS_ADAPTOR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
45 #include <blaze/util/Suffix.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // MUST_BE_ADAPTOR_TYPE CONSTRAINT
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
66 template< bool > struct CONSTRAINT_MUST_BE_ADAPTOR_TYPE_FAILED;
67 template<> struct CONSTRAINT_MUST_BE_ADAPTOR_TYPE_FAILED<true> { enum { value = 1 }; };
69 //*************************************************************************************************
70 
71 
72 //*************************************************************************************************
79 #define BLAZE_CONSTRAINT_MUST_BE_ADAPTOR_TYPE(T) \
80  typedef \
81  blaze::CONSTRAINT_TEST< \
82  blaze::CONSTRAINT_MUST_BE_ADAPTOR_TYPE_FAILED< blaze::IsAdaptor<T>::value >::value > \
83  BLAZE_JOIN( CONSTRAINT_MUST_BE_ADAPTOR_TYPE_TYPEDEF, __LINE__ )
84 //*************************************************************************************************
85 
86 
87 
88 
89 //=================================================================================================
90 //
91 // MUST_NOT_BE_ADAPTOR_TYPE CONSTRAINT
92 //
93 //=================================================================================================
94 
95 //*************************************************************************************************
105 template< bool > struct CONSTRAINT_MUST_NOT_BE_ADAPTOR_TYPE_FAILED;
106 template<> struct CONSTRAINT_MUST_NOT_BE_ADAPTOR_TYPE_FAILED<true> { enum { value = 1 }; };
108 //*************************************************************************************************
109 
110 
111 //*************************************************************************************************
118 #define BLAZE_CONSTRAINT_MUST_NOT_BE_ADAPTOR_TYPE(T) \
119  typedef \
120  blaze::CONSTRAINT_TEST< \
121  blaze::CONSTRAINT_MUST_NOT_BE_ADAPTOR_TYPE_FAILED< !blaze::IsAdaptor<T>::value >::value > \
122  BLAZE_JOIN( CONSTRAINT_MUST_NOT_BE_ADAPTOR_TYPE_TYPEDEF, __LINE__ )
123 //*************************************************************************************************
124 
125 } // namespace blaze
126 
127 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IsAdaptor type trait.
Constraint wrapper class.
Header file for compile time constraints.