id summary reporter owner description type status milestone component version severity resolution keywords cc 4621 "Feature Request: add some version of ""type erasure"" range/iterator" Ilya Murav'jov Neil Groves "Hi! I successfully use B.Lambda/B.Function for closure functionality in my code and would like to do the same with complex iterators/ranges . I've successfully implemented such ""any"" iterator range on top of any_iterator ( thanks to http://thbecker.net/free_software_utilities/type_erasure_for_cpp_iterators/start_page.html ), see [[http://gitorious.org/bombono-dvd/bombono-dvd/blobs/master/src/mlib/range/any_range.h|any_range.h]] . The common use case is as follows (my real code, [[http://gitorious.org/bombono-dvd/bombono-dvd/blobs/master/src/mgui/editor/select.cpp|select.cpp]]): {{{#!c++ fe::range SelectedMediaObjs(MenuRegion& mn_rgn, const int_array& sel_arr) { return fe::make_any( sel_arr | fe::transformed(ToMOTransform(mn_rgn)) ); } fe::range SelectedMediaObjs(MEditorArea& edt_area) { return SelectedMediaObjs(edt_area.CurMenuRegion(), edt_area.SelArr()); } ... // somewhere else ... BOOST_FOREACH( Comp::MediaObj* obj, SelectedMediaObjs(edt_area) ) { res_mi = obj->MediaItem(); break; } }}} " Patches closed To Be Determined range Boost 1.44.0 Not Applicable fixed muravev@…