sort関数の比較関数を、クラスのメンバ関数として定義すると invalid use of non-static member function というエラーが出ます。
なぜこれは禁止されるのでしょうか。
また、どうやって解決したら良いですか。