GithubHelp home page GithubHelp logo

Comments (3)

jbcoe avatar jbcoe commented on July 19, 2024 1

@Ukilele I hope it was implicit that our answer to "I hope it's fine that I append my thoughts to this issue" is that your input is, has been and continues to be extremely welcome. You've a great eye for detail and are a pleasure to work with.

from value_types.

Ukilele avatar Ukilele commented on July 19, 2024

I took a look at the current implementation of hash at indirect.h#L288. I hope it's fine that I append my thoughts to this issue:

  1. Do you intend to support hash for indirect with custom allocators? Right now std::hash is specialized only for indirect<T> (which is the same as indirect<T, std::allocator<T>>), but there is no support for arbitrary allocator types.
  2. I took a look at how std::hash is specialized for std::optional: https://eel.is/c++draft/optional#hash. The wording also supports hashing std::optional<const T>. Do you intend to support hashing indirect<const T>, too? I think that before answering this question, the first question to answer is whether indirect<const T> (and polymorphic<const T>) should be supported.

from value_types.

Twon avatar Twon commented on July 19, 2024

Hi @Ukilele,

Thanks, good catch regarding std::hash, that's an oversight in the implementation. This should work with custom allocators, I've now added support for this: #56

Regarding whether we should support indirect<const T> and polymorphic<const T> that is a good question and should probably be mentioned either way in the paper. @jbcoe what are your thoughts here?

from value_types.

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.