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 //*************************************************************************************************
116 template< typename T1 // Type of the left-hand side operand
117  , typename T2 // Type of the right-hand side operand
118  , typename OP > // Type of the custom operation
120 {
121  private:
122  //**********************************************************************************************
124  struct MappedType
125  {
126  using Type = Decay_< decltype( std::declval<OP>()( std::declval<T1>(), std::declval<T2>() ) ) >;
127  };
129  //**********************************************************************************************
130 
131  public:
132  //**********************************************************************************************
138  , MappedType >::Type;
140  //**********************************************************************************************
141 };
142 //*************************************************************************************************
143 
144 
145 //*************************************************************************************************
158 template< typename T1 // Type of the left-hand side operand
159  , typename T2 // Type of the right-hand side operand
160  , typename OP > // Type of the custom operation
162 //*************************************************************************************************
163 
164 } // namespace blaze
165 
166 #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:161
Header file for the IsVolatile type trait.
Header file for the Decay 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.
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:119