태그: STL
No raw loops! Yes STL algorithms!
raw loop를 STL 알고리즘으로 바꾸는 이유를 예제로 정리했습니다. erase와 push가 섞인 반복문을 어떤 알고리즘으로 대체하는지 코드로 비교합니다.
Thread safety of unordered_map (shared_timed_mutex)
unordered_map을 멀티 스레드에서 쓰다 겪은 문제와 해결을 정리했습니다. shared_timed_mutex로 읽기와 쓰기를 나누는 방법을 코드로 설명합니다.