Comments (2)
My previous proposal was mistake, it causes more problems than solves.
After some more digging I find the root of problem in fifo_map_compare::operator()
New slow but working solution could be:
// look up timestamps for both keys
// const auto timestamp_lhs = keys->operator[](lhs);
// const auto timestamp_rhs = keys->operator[](rhs);
//bernau84 fix
const auto timestamp_lhs = (keys->find(lhs) != keys->end()) ? keys->operator[](lhs) : 0;
const auto timestamp_rhs = (keys->find(rhs) != keys->end()) ? keys->operator[](rhs) : 0;
from fifo_map.
Thanks for reporting! The test suite is definitely not good enough - otherwise I should have noticed earlier!
from fifo_map.
Related Issues (10)
- Replace vector by map to improve key lookup/deletion performance
- Isn't the time complexity a little high, when `for (auto x : m) { ... }`?
- Clang libstdc++ failed with gcc
- catching polymorphic type ‘class std::out_of_range’ by value
- Can not be compiled with clang-15 and libc++ HOT 1
- Problem with the assignment operator HOT 1
- will this class support move() ?
- swap function is error HOT 1
- Tags with version number would be useful for packaging HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fifo_map.