boost::bind makes my brain hurt

why?

typedef ... K;
typedef std::map<k , HANDLE> map_type;
map_type map_;
...
std::for_each(map_.begin(), map_.end(),
    boost::bind(&map_type::value_type::second, _1)); // this works
std::for_each(map_.begin(), map_.end(),
    boost::bind(WSACloseEvent,
    boost::bind(&map_type::value_type::second, _1)));
    // this barfs inside boost::bind ... incomplete type
This entry was posted in tech. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>