_pimpl->_connectionsはstd::mapなので、その要素はPredicate を使用して不要な値を除外しstd::pair<KeyType, gcl::SectionConnectionT*>たいと考えています。gcl::SectionConnectionT::NotConnectedTo(r)しかし、私が使用する場合
std::remove_copy_if(it_pair.first, it_pair.second, std::back_inserter(sectionConnections), gcl::SectionConnectionT::NotConnectedTo(r));
pairをベクターに挿入しようとします。しかし、ベクトルはタイプ<gcl::SectionConnectionT*>のものです いくつかのグーグル検索transform_iteratorで、理解する方法が理解できないものにたどり着きました。こんな感じで使いました。しかし、コンパイルエラーが発生しますS
std::pair<CollectionT::iterator, CollectionT::iterator> it_pair = _pimpl->_connections.equal_range(l);
std::vector<gcl::SectionConnectionT*> sectionConnections;
std::remove_copy_if(it_pair.first, it_pair.second, boost::make_transform_iterator(std::back_inserter(sectionConnections), util::shorthand::pair_second()), gcl::SectionConnectionT::NotConnectedTo(r));