Coder Social home page Coder Social logo

Comments (3)

phlptp avatar phlptp commented on July 4, 2024

for 1, it would need to be done in C++11 constexpr expression which could be difficult, and actually the wrapping behavior is utilized in a few cases so not sure I would want that checking in general. Something like a checked_multiply might be appropriate that wouldn't operate in constexpr and does any required checks might be appropriate.

As far as increasing the range the space requirements for many of our applications mean we didn't really consider that. I think most of the code would work fine though, Obviously have to change the unit_data class and the static asserts since they would all fail, but most other stuff should be the same. It would create some gaps in the data structures but if space isn't much of an issue that shouldn't be too big of deal. As far as a PR, I would want to be careful with it but not completely opposed. We would need to add one of the CI builds that actually used the change to make sure all the tests still passed.

from units.

SimonHeybrock avatar SimonHeybrock commented on July 4, 2024

Something like a checked_multiply might be appropriate that wouldn't operate in constexpr and does any required checks might be appropriate.

That sounds like a good suggestion, I'll look into it.

I think most of the code would work fine though, Obviously have to change the unit_data class and the static asserts since they would all fail, but most other stuff should be the same.

It does, I had experimented with this change yesterday and didn't encounter real issues so far. But you make a very good point about the CI and test coverage.

from units.

SimonHeybrock avatar SimonHeybrock commented on July 4, 2024

Fixed in #142.

from units.

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.