All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsComputation.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TYPETRAITS_ISCOMPUTATION_H_
23 #define _BLAZE_MATH_TYPETRAITS_ISCOMPUTATION_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <boost/type_traits/is_base_of.hpp>
31 #include <blaze/util/FalseType.h>
32 #include <blaze/util/SelectType.h>
33 #include <blaze/util/TrueType.h>
34 
35 
36 namespace blaze {
37 
38 //=================================================================================================
39 //
40 // ::blaze NAMESPACE FORWARD DECLARATIONS
41 //
42 //=================================================================================================
43 
44 struct Computation;
45 
46 
47 
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
60 template< typename T >
61 struct IsComputationHelper
62 {
63  //**********************************************************************************************
64  enum { value = boost::is_base_of<Computation,T>::value && !boost::is_base_of<T,Computation>::value };
65  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
66  //**********************************************************************************************
67 };
69 //*************************************************************************************************
70 
71 
72 //*************************************************************************************************
85 template< typename T >
86 struct IsComputation : public IsComputationHelper<T>::Type
87 {
88  public:
89  //**********************************************************************************************
91  enum { value = IsComputationHelper<T>::value };
92  typedef typename IsComputationHelper<T>::Type Type;
94  //**********************************************************************************************
95 };
96 //*************************************************************************************************
97 
98 } // namespace blaze
99 
100 #endif