flat_multimap::emplace not sorting elements under GCC
OFFTKP opened this issue · comments
Hello!
I have attached a code snippet.
main.txt
If you build it like this:
g++ -O3 main.cpp
The output is not sorted, next timestamp should be 6000.
Next timestamp: 10000
Time: 6000, TaskType: 0
Time: 10000, TaskType: 1
Next timestamp should be 6000.
If you compile with O2 using g++, or you compile using clang++ however, the issue is fixed:
clang++ -O3 main.cpp
Next timestamp: 6000
Time: 6000, TaskType: 0
Time: 10000, TaskType: 1
accidentally opened twice, closing