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 //*************************************************************************************************
93 template< typename T // Type of the operand
94  , typename OP > // Type of the custom operation
96 {
97  private:
98  //**********************************************************************************************
100  struct MappedType
101  {
102  using Type = Decay_< decltype( std::declval<OP>()( std::declval<T>() ) ) >;
103  };
105  //**********************************************************************************************
106 
107  public:
108  //**********************************************************************************************
112  , MappedType >::Type;
114  //**********************************************************************************************
115 };
116 //*************************************************************************************************
117 
118 
119 //*************************************************************************************************
132 template< typename T // Type of the operand
133  , typename OP > // Type of the custom operation
135 //*************************************************************************************************
136 
137 } // namespace blaze
138 
139 #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: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.
typename UnaryMapTrait< T, OP >::Type UnaryMapTrait_
Auxiliary alias declaration for the UnaryMapTrait class template.The UnaryMapTrait_ alias declaration...
Definition: UnaryMapTrait.h:134
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:95