Coder Social home page Coder Social logo

Comments (5)

Quuxplusone avatar Quuxplusone commented on August 16, 2024 1

@p-groarke: If you have "many features" you'd like to add, I'd recommend forking the repo, adding all the features in a branch, and then submitting the whole thing as a big patch so we can see how all the new things work together. Bugfixes = incremental, design work = holistic. :) (#135 is certainly related, if we're doing design work.)

FWIW, I haven't seen any comments on this repo from @Masstronaut (Allan Deutsch) for a long time. I myself am the original author of this repo's "slot_map.h", which I did just by slavishly following Allan's P0661R0. Allan has his own slot_map at https://github.com/Masstronaut/slot_array .

I see there is also https://github.com/twiggler/slotmap . I don't know anything about it except that it has a lot of heavy dependencies: std::random_device, Boost.Integer, Boost.Hana,...

from sg14.

p-groarke avatar p-groarke commented on August 16, 2024

OK I believe that is provided by slot_iter_from_value_iter, it is simply marked private.

from sg14.

Quuxplusone avatar Quuxplusone commented on August 16, 2024

This, like #131, sounds like a legitimate design issue. @Masstronaut, are you still interested in slot_map? Are these features good ideas, or did you consider them and then exclude them from the slot_map proposal for reasons that it would be worthwhile to recap here?

@p-groarke: If the functionality you think-you-need is there-but-private, then this issue should still be open, right? Either we should make the functionality public, or we should explain why you don't really need it, or we should explain why if you do need it you shouldn't be using slot_map.

My kneejerk reaction is that we should make it public, which means bikeshedding the name/API. Like,

slot_map<K, V> sm;
std::vector<V>::iterator it = sm.begin();
K k = sm.key(it);  // new functionality -- is this a good API?
assert(sm.find(k) == it);

from sg14.

p-groarke avatar p-groarke commented on August 16, 2024

@Quuxplusone Fair point, until we get an answer from the author and windows CI, my hands are a little tied. I have many features I'd like to add. I'm happy to send a PR for this one if the original author is on board / doesn't have objections.

from sg14.

p-groarke avatar p-groarke commented on August 16, 2024

@Quuxplusone Sounds good to me. Will continue to gain some experience with the container in the meantime. I personally really like the name you proposed sm.key(it). It is short and to-the-point. I have some general questions, would you rather I open another issue or email you with them?

from sg14.

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.