All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Comparable.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_CONSTRAINTS_COMPARABLE_H_
23 #define _BLAZE_UTIL_CONSTRAINTS_COMPARABLE_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
31 #include <blaze/util/Suffix.h>
33 
34 
35 namespace blaze {
36 
37 //=================================================================================================
38 //
39 // POINTER_MUST_BE_COMPARABLE CONSTRAINT
40 //
41 //=================================================================================================
42 
43 //*************************************************************************************************
53 template< bool > struct CONSTRAINT_POINTER_MUST_BE_COMPARABLE_FAILED;
54 template<> struct CONSTRAINT_POINTER_MUST_BE_COMPARABLE_FAILED<true> { enum { value = 1 }; };
56 //*************************************************************************************************
57 
58 
59 //*************************************************************************************************
65 #define BLAZE_CONSTRAINT_POINTER_MUST_BE_COMPARABLE(P1,P2) \
66  typedef \
67  ::blaze::CONSTRAINT_TEST< \
68  ::blaze::CONSTRAINT_POINTER_MUST_BE_COMPARABLE_FAILED< ::blaze::IsConvertible<P1,P2>::value || \
69  ::blaze::IsConvertible<P2,P1>::value >::value > \
70  BLAZE_JOIN( CONSTRAINT_POINTER_MUST_BE_COMPARABLE_TYPEDEF, __LINE__ )
71 //*************************************************************************************************
72 
73 } // namespace blaze
74 
75 #endif