
I'm having some troubles using adaptors::map_keys with custom iterators over Qt associative containers. The problem with Qt associative containers is that they provide iterators over a set of values, not over a set of key-value pairs. I have worked that around by introducing boost range bindings: http://codepad.org/xnZrpZ5i However, when these binding are used, the following code produces a compilation error: BOOST_FOREACH(auto pair, (QMap<int, int>()) | boost::adaptors::map_keys); Everything works fine if the code of boost::range_detail::select_first is slightly modified. You'll find the patch attached. I believe it's a problem in boost range, but I may be wrong, so I need some expert help here. -- Best regards, Alexander Fokin, http://elric.ru.