GithubHelp home page GithubHelp logo

How to use Ruckig in C++11 about ruckig HOT 5 CLOSED

pantor avatar pantor commented on August 15, 2024
How to use Ruckig in C++11

from ruckig.

Comments (5)

pantor avatar pantor commented on August 15, 2024 2

There is now a script for patching Ruckig for C++11.

from ruckig.

pantor avatar pantor commented on August 15, 2024

Hi @personal-fork-robot,

Ruckig makes use of several C++17 features, but I don't think that there would be some hidden errors. If it compiles in C++11, it should be fine! Please note that I really recommend a compiler supporting C++17, so perhaps it's easier to update the compiler before downgrading Ruckig?

Following steps come to my mind:

  • As you've written, replace std::optional with some polyfill implementation.
  • Some auto parameters would indeed be replaced manually.
  • Ruckig uses if constexpr, which would probably the hardest to replace it in C++11. As a start, you could just drop the constexpr, resulting in a (very slightly) higher runtime duration. I don't know the exact support of constexpr in C++11, so maybe it needs to be dropped for static variables as well.
  • There are some C++17 structured bindings in the codebase.

Feel free to complement this list if I forgot something.

from ruckig.

personal-fork-robot avatar personal-fork-robot commented on August 15, 2024

Thank you for your quick feedback @pantor .
Those are the only two problems I've had for the time being,and if constexpr just results in some warnnings in C++11 but not error. Maybe I'll deal with those warnings later, but for now it doesn't affect the program very much.

from ruckig.

pantor avatar pantor commented on August 15, 2024

Just one remark: if constexpr is a C++17 feature. However, as with all modern C++ features, its support depends on the exact compiler version.

from ruckig.

personal-fork-robot avatar personal-fork-robot commented on August 15, 2024

Thx a lot:)

from ruckig.

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.