Comments (5)
Thank you for the report.
From a quick test with clang++-14.0.6
and g+-12.2.0
with -O3
using libstdc++
on you provided example I get the expected results:
1
4
annotationId, kind, oldUri, newUri,
1
4
annotationId, kind, oldUri, newUri,
I'll check more in depth when I have some time as your results are quite worrying.
from ordered-map.
In case it helps, I've managed to create a better reproduction which fails on every platform I've tried it on:
tsl::ordered_set<std::size_t, IdentityHash> foo;
foo.emplace(1657314675755591361ull);
foo.emplace(8148226713986838624ull);
foo.insert_at_position(foo.begin(), 17991626144733246576ull);
std::cout << foo.count(1657314675755591361ull); // always prints 0
where
struct IdentityHash {
std::size_t operator()(std::size_t x) const { return x; }
};
that fails on
- Visuals Studio 2019 (192930143)
- Apple clang 14.0.0 (libc++) (both ARM & x64)
- GCC 11.2 (not sure which standard lib) (both ARM & x64)
On at least some of those I've tested with and without NDEBUG and with varied optimisation levels. So I'm pretty sure this version will reproduce on any compiler or standard library you care to try.
from ordered-map.
Thank you very much for the example.
I was able to reproduce the error and pushed a fix. Both insert_at_position
and erase
are affected (not unordered_erase
and pop_back
). Could you try it out?
I'll check to add some extra tests later.
from ordered-map.
I merged the PR and created a new release. Thanks for the help.
I will close the issue. Let me know if you encounter any problem and I can reopen it.
from ordered-map.
Many thanks for the speedy fix. It works on my end too.
from ordered-map.
Related Issues (20)
- tsl::ordered_map<int, const std::string> failed to compile HOT 4
- Visual Studio 2017 and ordered-map HOT 3
- Runtime error HOT 4
- 64 bit bucket_entry HOT 3
- Packaging for conda HOT 8
- Insertion by iterator throws a compile error if a const iterator is used HOT 1
- serialization HOT 2
- Add lower_bound function HOT 1
- Non-const dereferencing HOT 4
- Serialize with boost and C++11/14 HOT 2
- How to get an element by a random number? HOT 1
- Eliminating the difference in what an iterator yields HOT 5
- Add erase_if function
- `tsl::ordered_set<bool>` with `std::vector` HOT 2
- Conflict with `Windows.h` HOT 1
- Comparing keys between two tsl::ordered_map objects
- The ordered_map is crashed with map.earse(it++) HOT 1
- It's possible provide the value() method for reverse_iterator? HOT 2
- Thread safety for changing values of keys already in `ordered_map` HOT 3
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 ordered-map.