UnaryMapTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_UNARYMAPTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_UNARYMAPTRAIT_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 //*************************************************************************************************
115 template< typename T // Type of the operand
116  , typename OP > // Type of the custom operation
118 {
119  private:
120  //**********************************************************************************************
122  struct MappedType
123  {
124  using Type = Decay_< decltype( std::declval<OP>()( std::declval<T>() ) ) >;
125  };
127  //**********************************************************************************************
128 
129  public:
130  //**********************************************************************************************
134  , MappedType >::Type;
136  //**********************************************************************************************
137 };
138 //*************************************************************************************************
139 
140 
141 //*************************************************************************************************
154 template< typename T // Type of the operand
155  , typename OP > // Type of the custom operation
157 //*************************************************************************************************
158 
159 } // namespace blaze
160 
161 #endif
Header file for auxiliary alias declarations.
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
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.
typename UnaryMapTrait< T, OP >::Type UnaryMapTrait_
Auxiliary alias declaration for the UnaryMapTrait class template.The UnaryMapTrait_ alias declaration...
Definition: UnaryMapTrait.h:156
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 UnaryMapTrait class.
Definition: UnaryMapTrait.h:117