std::sort 쓸 때, 클래스를 정렬할때 연산자 오버로딩을 써서 정렬하던데
std::sort에 매개변수 2개밖에 안넣더라고. 3번째 매개변수가 필요없음.
그러면 연산자 오버로딩이 사용되는건 std::sort 내부에서 적용되는거임?
혹시 검색어좀 알려줄 수 있음?? 검색하면 사용법만 나와서,,,
std::sort 쓸 때, 클래스를 정렬할때 연산자 오버로딩을 써서 정렬하던데
std::sort에 매개변수 2개밖에 안넣더라고. 3번째 매개변수가 필요없음.
그러면 연산자 오버로딩이 사용되는건 std::sort 내부에서 적용되는거임?
혹시 검색어좀 알려줄 수 있음?? 검색하면 사용법만 나와서,,,
operator< - dc App
https://en.cppreference.com/w/cpp/algorithm/sort
뭐가
알고싶은 건지를 정확히 모르겠음
https://github.com/gcc-mirror/gcc/blob/d9375e490072d1aae73a93949aa158fcd2a27018/libstdc%2B%2B-v3/include/bits/stl_algo.h#L4809
https://github.com/llvm-mirror/libcxx/blob/a12cb9d211019d99b5875b6d8034617cbc24c2cc/include/algorithm#L4104
세번째 매개변수가 뭔데 comparator 줄거면 오버로딩을 왜함
이 사람들은 이거 짜면서 무슨 생각할까