remove_ifon の使用中にラムダ式に小さな問題がありますstd::vector
次のコードがあります。
    std::remove_if( openList.begin(), openList.end(), 
        [&](BoardNode& i){
            std::cout<< i.getCoordinates() << std::endl;
            std::cout<< currentNode.getCoordinates() << std::endl;
            return i.getCoordinates() == currentNode.getCoordinates(); }
        );
これにはコンパイラ エラーはありませんが、上記のステートメントから true を返す要素はベクトルから削除されません。
私は画面に印刷されます。
[5,5]
[5,5]
が、元のopenListまま。