00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
00019 #define _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
00020
00021 # ifndef _STLP_INTERNAL_FUNCTION_H
00022 # include <stl/_function_base.h>
00023 # endif
00024
00025
00026
00027
00028 _STLP_BEGIN_NAMESPACE
00029
00030 template <class _Traits>
00031 struct _Eq_traits
00032 : public binary_function<typename _Traits::char_type,
00033 typename _Traits::char_type,
00034 bool>
00035 {
00036 bool operator()(const typename _Traits::char_type& __x,
00037 const typename _Traits::char_type& __y) const
00038 { return _Traits::eq(__x, __y); }
00039 };
00040
00041 template <class _Traits>
00042 struct _Eq_char_bound
00043 : public unary_function<typename _Traits::char_type, bool>
00044 {
00045 typename _Traits::char_type __val;
00046 _Eq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
00047 bool operator()(const typename _Traits::char_type& __x) const
00048 { return _Traits::eq(__x, __val); }
00049 };
00050
00051 template <class _Traits>
00052 struct _Neq_char_bound
00053 : public unary_function<typename _Traits::char_type, bool>
00054 {
00055 typename _Traits::char_type __val;
00056 _Neq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
00057 bool operator()(const typename _Traits::char_type& __x) const
00058 { return !_Traits::eq(__x, __val); }
00059 };
00060
00061 template <class _Traits>
00062 struct _Eq_int_bound
00063 : public unary_function<typename _Traits::char_type, bool>
00064 {
00065 typename _Traits::int_type __val;
00066
00067 _Eq_int_bound(typename _Traits::int_type __c) : __val(__c) {}
00068 bool operator()(const typename _Traits::char_type& __x) const
00069 { return _Traits::eq_int_type(_Traits::to_int_type(__x), __val); }
00070 };
00071
00072 # if 0
00073 template <class _Traits>
00074 struct _Lt_traits
00075 : public binary_function<typename _Traits::char_type,
00076 typename _Traits::char_type,
00077 bool>
00078 {
00079 bool operator()(const typename _Traits::char_type& __x,
00080 const typename _Traits::char_type& __y) const
00081 { return _Traits::lt(__x, __y); }
00082 };
00083 # endif
00084
00085 _STLP_END_NAMESPACE
00086
00087 #endif
00088
00089
00090
00091
00092
00093
00094
00095