-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
more operator of int128 #3559
more operator of int128 #3559
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many operators are not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can further overhaul the conversion functions. It might be better to add test coverage to tests/std/tests/P1522R1_difference_type/test.cpp.
Co-authored-by: A. Jiang <de34@live.cn>
int a[3];
_Signed128 b=2;
a[b]=5;//error I'm not quite sure how to fix this, it doesn't look like it's something that can be done with custom types..... |
Could you run
|
This reverts commit 6aa5c10.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There're still some problems.
It's impossible to "fix" this, because the built-in |
What a sad story.
thanks for help!
thx for help Co-authored-by: Igor Zhukov <fsb4000@yandex.ru>
Is there a need for these operators? |
@strega-nil-ms , no it's not an internal type. People want int128: https://developercommunity.visualstudio.com/t/Support-for-128-bit-integer-type/879048 I added a workaround there: #include <ranges>
using int128 = std::ranges::range_difference_t<std::ranges::iota_view<long long, long long>>; and later @frederick-vs-ja backported the library solution to C++14 (i.e., to all supported modes) (#3036) and added a workaround there:
|
tbh, I don't really care if |
even if we did want to support 128bit extended types I'm not sure documenting _Int128 would really satisfy that feature request, esp since it probably wouldn't be possible to make it a drop-in replacement for the GCC/Clang functionality. |
This reverts commit d29abb3.
Thanks for looking into this. We talked about it at the weekly maintainer meeting and have decided to close this PR without merging, because this is implementing a non-Standard extension, which is explicitly a non-goal of our project as mentioned in our README. Specifically, the requirements for integer-class types are listed in WG21-N4928 [iterator.concept.winc], and (despite the name of the type category) they don't require "behaves like real integer types in all conceivable ways". In particular, conversions to and from floating-point types aren't required at all. |
No description provided.