-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo: Constification of library for C++20 #42
Conversation
Nice job @johnmcfarlane and many thanks for this inspirational direction! Somehow all this is leading to either a newer version of the LIB with signed/unsigned/constexpr support, as I hinted in previous posts. For some time, I have known that I'll be re-factoring or re-loading the wide_integer project, now we need to figure out the best way(s) to do that while both:
All this information needs to solidify in my mind. |
Take your time. I wouldn't rush to do-over from scratch. You'll find that your tests -- in particular -- are very valuable and will want to be kept. I maintain that you can think of the signed and constexpr features as orthogonal. As you can see, If you're going to spent some time planning, I would think about signedness and how that changes things. But I'd still recommend evolution over revolution. If it were my choice, I'd indeed no start by changing So basically, I think our approaches may naturally fork at |
fa1d124
to
00cf1a8
Compare
That seems like good advice. I do not intend to throw out or break in any way my existing We (and I especially) will need to think about all of this for a while and figure out how best to provide the signed type requested. |
OK. I will try. |
fa04a7c
to
102c659
Compare
Means that many tests can use constexpr variables using C++20
From cppreference.cpp: https://en.cppreference.com/w/cpp/algorithm/fill
From cppreference.cpp: https://en.cppreference.com/w/cpp/algorithm/copy
Required for C++17 conformance
Hi. I came up with an alternative approach which I think may be worthy of merging in #45. I'll close this PR if that looks acceptable and once it's in. |
Understood. Now being handled in #45 |
Don't merge this change unless you want to drop C++11/14/17 support! It's just for demo purposes.