BinaryMapTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_BINARYMAPTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_BINARYMAPTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
44 #include <blaze/math/Aliases.h>
47 #include <blaze/util/mpl/If.h>
48 #include <blaze/util/mpl/Or.h>
53 
54 
55 namespace blaze {
56 
57 //=================================================================================================
58 //
59 // CLASS DEFINITION
60 //
61 //=================================================================================================
62 
63 //*************************************************************************************************
94 template< typename T1 // Type of the left-hand side operand
95  , typename T2 // Type of the right-hand side operand
96  , typename OP > // Type of the custom operation
98 {
99  private:
100  //**********************************************************************************************
102  struct MappedType
103  {
104  using Type = Decay_< decltype( std::declval<OP>()( std::declval<T1>(), std::declval<T2>() ) ) >;
105  };
107  //**********************************************************************************************
108 
109  public:
110  //**********************************************************************************************
116  , MappedType >::Type;
118  //**********************************************************************************************
119 };
120 //*************************************************************************************************
121 
122 
123 //*************************************************************************************************
136 template< typename T1 // Type of the left-hand side operand
137  , typename T2 // Type of the right-hand side operand
138  , typename OP > // Type of the custom operation
140 //*************************************************************************************************
141 
142 } // namespace blaze
143 
144 #endif
Header file for auxiliary alias declarations.
typename RemoveAdaptor< T >::Type RemoveAdaptor_
Auxiliary alias declaration for the RemoveAdaptor type trait.The RemoveAdaptor_ alias declaration pro...
Definition: RemoveAdaptor.h:153
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:75
typename Decay< T >::Type Decay_
Auxiliary alias declaration for the Decay type trait.The Decay_ alias declaration provides a convenie...
Definition: Decay.h:98
typename BinaryMapTrait< T1, T2, OP >::Type BinaryMapTrait_
Auxiliary alias declaration for the BinaryMapTrait class template.The BinaryMapTrait_ alias declarati...
Definition: BinaryMapTrait.h:139
Header file for the IsVolatile type trait.
Header file for the Decay type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Header file for the Or class template.
Header file for the RemoveAdaptor type trait.
Compile time check for adaptors.This type trait tests whether the given template parameter is an adap...
Definition: IsAdaptor.h:88
Header file for the IsAdaptor type trait.
Header file for the IsConst type trait.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:154
Header file for the IsReference type trait.
Compile time check for constant data types.The IsConst type trait tests whether or not the given temp...
Definition: IsConst.h:75
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:75
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:97