00001
00002 #ifndef _INSTIGATE_OPEN_SOURCE_INTERNAL_HEADER_IN_CONCEPT
00003 #error This is an internal header file used to implement Instigate STL.\
00004 It should never be included directly by a program.
00005 #endif
00006
00007 #ifndef INSTIGATE_STL_STL_FUNCTION_HPP
00008 #define INSTIGATE_STL_STL_FUNCTION_HPP
00009
00059
00060
00061
00062
00063
00064
00065
00066 namespace instigate {
00067 namespace stl {
00068 template <typename Tp>
00069 struct multiplies;
00070
00071 template <typename A, typename R>
00072 struct unary_function_model;
00073
00074 template <typename A1, typename A2, typename R>
00075 struct binary_function_model;
00076 }
00077 }
00078
00082 template <typename Tp>
00083 struct instigate::stl::multiplies :
00084 instigate::stl::binary_function_model<Tp, Tp, Tp>
00085 {
00090 Tp operator()(const Tp& x, const Tp& y) const
00091 {
00092 return x * y;
00093 }
00094 };
00095
00099 template <typename A, typename R>
00100 struct instigate::stl::unary_function_model
00101 {
00103 typedef A argument_type;
00104
00106 typedef R result_type;
00107 };
00108
00112 template <typename A1, typename A2, typename R>
00113 struct instigate::stl::binary_function_model
00114 {
00116 typedef A1 first_argument_type;
00117
00119 typedef A2 second_argument_type;
00120
00122 typedef R result_type;
00123 };
00124
00125
00126
00127 #endif // INSTIGATE_STL_STL_FUNCTION_HPP