boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
96 stars 116 forks source link

flat_multimap::emplace not sorting elements under GCC #268

Closed OFFTKP closed 3 months ago

OFFTKP commented 3 months ago

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
OFFTKP commented 3 months ago

accidentally opened twice, closing