Git Product home page Git Product logo

Comments (5)

Tessil avatar Tessil commented on June 15, 2024

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.

BenjiHansell avatar BenjiHansell commented on June 15, 2024

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.

Tessil avatar Tessil commented on June 15, 2024

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.

Tessil avatar Tessil commented on June 15, 2024

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.

BenjiHansell avatar BenjiHansell commented on June 15, 2024

Many thanks for the speedy fix. It works on my end too.

from ordered-map.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.