fork(1) download
  1. #include <string>
  2. #include <map>
  3. #include <functional>
  4.  
  5.  
  6. int main()
  7. {
  8. using map_t = std::map<std::string, int>;
  9. map_t map { {"A", 10}, {"B", 11}, {"C", 12}, {"D", 13}, {"E", 14}, {"F", 15} };
  10.  
  11. using map_find_t = map_t::const_iterator (map_t::*)(map_t::key_type const&) const;
  12.  
  13. auto f = std::bind(static_cast<map_find_t>(&map_t::find), &map, std::placeholders::_1);
  14. f("A");
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
Standard output is empty