私のコードの基本構造は
class Foo{
vector<string> _lines;
vector<int> _n;
public:
...
bool Comp(int i, int j){
return something that depends on _lines;
}
...
void doSomething(){
std::sort(_n.begin(), _n.end(), Comp);
}
...
};
しかし、私は得る
error: no matching function for call to
‘sort(std::vector<unsigned int>::iterator,
std::vector<unsigned int>::iterator, <unresolved overloaded function type>)
ベクトルをコピーせずにこの問題を解決するにはどうすればよいですか? (これらのベクトルは、正確には 17179508 文字列という非常に大きな文字列であるため)。