Hello,
std::vectorstd::string separated std::set<Foo> foos;
boost::copy(separated | boost::adaptors::transformed(boost::bind(Foo::fromString, _1)) | boost::adaptors::filtered(boost::bind(&Foo::isValid, _1)), std::inserter(foos, foos.end()));
boost::copy forwards everything to std::copy with iterators that hold function objects by value. Iterator concept requires iterators to be default constructible, but if they hold function objects that have binded data they cannot be made such. FWIW one of solutions to this problem is wrapping function object f with boost::regular(f), available here: https://github.com/faithandbrave/OvenToBoost AFAIR it's supposed to be integrated into boost some day, and also there was some discussion in this list about it. -- ------------ Sergey Mitsyn.