// ---------------------------------------------------------------------- // // mem_fun1.cc - Do we support the 3-argument forms of mem_fun? // // History: // 17-May-2000 WEB Initial draft // 06-Feb-2001 WEB Add tests for the _ref forms // 25-Apr-2001 WEB s//"ISOcxx\/ISOcxxSyntax.hh"/ // // ---------------------------------------------------------------------- #include "ISOcxx/ISOcxxSyntax.hh" #include struct C { C() { ; } int f( char c ); int g( char c ) const; }; // C int C::f( char c ) { return 0; } int C::g( char c ) const { return 0; } int main() { C c; C const cc; std::mem_fun1_t mf1t = std::mem_fun( &C::f ); std::const_mem_fun1_t cmf1t = std::mem_fun( &C::g ); std::mem_fun1_ref_t mf1rt = std::mem_fun_ref( &C::f ); std::const_mem_fun1_ref_t cmf1rt = std::mem_fun_ref( &C::g ); return mf1t (&c,'f') + cmf1t (&cc,'g') + mf1rt( c,'f') + cmf1rt( cc,'g') ; } // main()