Comments (11)
@Twon is picking this up.
from value_types.
- What is the motivation for C++11 implementations? Is the goal to make it more accessible for others to test it?
- Do you strive for a single header for
polymorphic
(andindirect
respectively) where certain features (likeoperator<=>
) are ecapsulated in an#ifdef feature-available
or do you want to have two different headers (indirect.h
(for c++20) andindirect_cpp11.h
(for C++11) )?
from value_types.
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.
@Ukilele we’re on a flight for the next 12+ hours if you’d like to start/try?
from value_types.
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.
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.
A fine idea! Happy to wire up your code.
from value_types.
Yes, also happy to assist here! Once you push up your changes we can contribute to the branch to address this.
from value_types.
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:
- 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 ofsizeof
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.
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.
Closing as now completed
from value_types.
Related Issues (20)
- Add tests to ensure types correctly use `allocator_traits<A>::pointer`, ideally based on `boost::offset_ptr` HOT 3
- Fix wording for move constructors when `allocator_traits::is_always_equal` is false
- Document the existence of pre-c++20 and experimental implementations of indirect and polymorphic
- P3019R4 says that polymorphic's moved-from state is valueless, which is not the author's intent HOT 1
- Update assignment wording
- Add explicit discussion of why valueless_after_move is needed
- Discuss indirect's non-conditional copy ctor in the light of concept trickery HOT 1
- Add a response to stack overflow question about polymorphism and pointers HOT 1
- Get CI running on a schedule on main
- Re-enable ASAN and TSAN on Bazel HOT 1
- Redundant condition in polymorphic's constraints HOT 2
- polymorphic_inline_vtable.h doesn't support moving with non-equal allocator HOT 3
- polymorphic's control block does not construct the object using the allocator HOT 1
- Add indirect and polymorphic to the ISO C++ Standard
- Don't delegate constructors in formal wording
- Pull Throws clause out of constructors and put it into a common block like wg21.link/P2642
- Remove remove_const from hash wording
- Align comparisons with those in reference wrapper
- Rewrite tests from scratch to test different types and allocators
- Convert paper to use LaTeX so that we can suitably highlight sections for insertion into the draft C++ standard.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from value_types.