Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 373 Bytes

Cpp.md

File metadata and controls

8 lines (5 loc) · 373 Bytes

C++

STL & Pointers

Say we have a class called Event. Which declares operator <(). We could use it in a container with sort. However, if we have Event* in a container, we don't get the same sorting behaviour.

We need to use external comparators in order to get the desired behaviour. See gist.