I'd like to ask you how could I copy all second elements from
map<string, string> myMap
to
deque<string> myDeq
using for_each or transform without creating a functor. I tried it like in this question
transform(myMap.begin(), myMap.end(), back_inserter(myDeq), mem_fun_ref(&map<string, string>::value_type::second));
but it didn't work for me - I got error "Illegal use of this type".