00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef MTL_STATIC_FUNCTOR_INCLUDE
00013 #define MTL_STATIC_FUNCTOR_INCLUDE
00014
00015 #include <complex>
00016
00017 namespace mtl {
00018
00019 #ifdef __GXX_CONCEPTS__
00020
00021
00022 auto concept StaticUnaryFunctor<typename T>
00023 {
00024 typename argument_type = T::argument_type;
00025 typename result_type = T::result_type;
00026
00027 static result_type apply(argument_type);
00028 result_type T::operator()(argument_type);
00029 };
00030
00031 auto concept StaticBinaryFunctor<typename T>
00032 {
00033 typename first_argument_type = T::first_argument_type;
00034 typename second_argument_type = T::second_argument_type;
00035 typename result_type = T::result_type;
00036
00037 static result_type apply(first_argument_type, second_argument_type);
00038 result_type T::operator()(first_argument_type, second_argument_type);
00039 };
00040
00041 #else // now without concepts
00042
00044
00047 template <typename T>
00048 struct StaticUnaryFunctor
00049 {
00051 typedef typename T::argument_type argument_type;
00053 typedef typename T::result_type result_type;
00054 };
00055
00057
00060 template <typename T>
00061 struct StaticBinaryFunctor
00062 {
00064 typedef typename T::first_argument_type first_argument_type;
00066 typedef typename T::second_argument_type second_argument_type;
00068 typedef typename T::result_type result_type;
00069 };
00070
00071 #endif // __GXX_CONCEPTS__
00072
00073 }
00074
00075 #endif // MTL_STATIC_FUNCTOR_INCLUDE