IsProxy.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISPROXY_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISPROXY_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
62 template< typename T >
63 struct IsProxyHelper
64 {
65  private:
66  //**********************************************************************************************
67  typedef char (&Yes)[1];
68  typedef char (&No) [2];
69 
70  template< typename PT, typename RT >
71  static Yes test( const Proxy<PT,RT>& );
72 
73  static No test( ... );
74  //**********************************************************************************************
75 
76  public:
77  //**********************************************************************************************
78  static constexpr bool value = ( sizeof( test( std::declval< RemoveCV_<T> >() ) ) == sizeof( Yes ) );
79  //**********************************************************************************************
80 };
82 //*************************************************************************************************
83 
84 
85 //*************************************************************************************************
109 template< typename T >
110 struct IsProxy : public BoolConstant< IsProxyHelper<T>::value >
111 {};
112 //*************************************************************************************************
113 
114 } // namespace blaze
115 
116 #endif
Header file for the RemoveCV type trait.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Compile time check for proxy types.This type trait tests whether or not the given template parameter ...
Definition: IsProxy.h:110
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for all forward declarations for proxies.
Header file for the IntegralConstant class template.