Giter VIP home page Giter VIP logo

Comments (11)

jbcoe avatar jbcoe commented on August 24, 2024

@Twon is picking this up.

from value_types.

Ukilele avatar Ukilele commented on August 24, 2024
  1. What is the motivation for C++11 implementations? Is the goal to make it more accessible for others to test it?
  2. Do you strive for a single header for polymorphic (and indirect respectively) where certain features (like operator<=>) are ecapsulated in an #ifdef feature-available or do you want to have two different headers (indirect.h (for c++20) and indirect_cpp11.h (for C++11) )?

from value_types.

jbcoe avatar jbcoe commented on August 24, 2024

Ideally different headers just to keep things readable and isolated. We’ve done this for experimental implantations of polymorphic already.

We want to get these types into the hands of as many folk as possible. Not everyone has C++20. C++11 is probably as far back as we can go.

from value_types.

jbcoe avatar jbcoe commented on August 24, 2024

@Ukilele we’re on a flight for the next 12+ hours if you’d like to start/try?

from value_types.

Ukilele avatar Ukilele commented on August 24, 2024

I wish you a save flight back! I hope you had a great time in Kona and I am definitely interested in hearing what the outcome of your presentation was.
If I find the time to start working on this issue next week, I will. But I can't make any guarantees.

from value_types.

Ukilele avatar Ukilele commented on August 24, 2024

I make good progress with the implementations of polymorphic and indirect for C++11. But I could need some help with all the "infrastructure" (CI, CMakeLists, test-environment, ...). I will upload my changes tomorrow and maybe someone of you could then contribute the infrastructure?

from value_types.

jbcoe avatar jbcoe commented on August 24, 2024

A fine idea! Happy to wire up your code.

from value_types.

Twon avatar Twon commented on August 24, 2024

Yes, also happy to assist here! Once you push up your changes we can contribute to the branch to address this.

from value_types.

Ukilele avatar Ukilele commented on August 24, 2024

I created the branch https://github.com/jbcoe/value_types/tree/dev-ukilele-c++11. It contains the folder "c++11" with a header for polymorphic and one for indirect. That's all I've done so far.

An open TODO that I will work on in the near future:

  1. In C++20 we have [[no_unique_address]] which we applied to our Allocators. In C++11 we would have to implement Empty Base Class Optimization ourselves, which I didn't do yet. Therefore the unit-test that check of sizeof will fail. I will implement this at some point.

The more important thing now is to tie up the CMake/Bazel project stuff. And to tie up the unit tests. Right now I would vote for one set of unit-tests, that we compile twice, once for C++11 and once for C++20 and include the files (indirect.h vs indirect_11.h) respectively. But all this is something which I am not experienced with and which I am sure you will resolve :)

from value_types.

Ukilele avatar Ukilele commented on August 24, 2024

One more thing: I don't know which compilers we are aiming to support. Different compilers seem to provide different support of C++11. On godbolt I tested gcc 7.1 and clang 3.9.0. All the C++11-compatible unit tests run (except the one testing for sizeof which I will make work soon). I did not test Visual Studio.

https://cpp11.compiler-explorer.com/z/c4PYoeW7z

from value_types.

Twon avatar Twon commented on August 24, 2024

Closing as now completed

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.