Repository navigation
<numeric> Optimize gcd to use builtins - #665
Conversation
|
Test failures look legit on this one :) |
|
Hm I compiled for me, I will check again :( |
|
Go home test you are drunk:
So it seems that common_unsigned does funny things |
|
The full error is:
So in the test the type is So the type passed to |
178616c to
d08ea4b
Compare
|
It seems that for whatever reason the template argument deduction fails. if I specify That however smells terribly like a compiler bug |
|
So tests are good, although I would like an opinion whether this is a compiler bug or just me not understanding C++. The only thing I could com up with is that |
Why not? https://eel.is/c++draft/expr.unary.op#10
https://eel.is/c++draft/conv.prom#2
("Can" here means the conversion exists as integral promotion. The key verb here is "are" above. Promotions are performed) |
Fix tpyo
Stephan T. Lavavej (StephanTLavavej)
left a comment
There was a problem hiding this comment.
Looks great, thank you! I tried my hardest, but the only issue I could find was a whitespace nitpick.
Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>
|
Thanks for the performance enhancement! π |
Description
This fixes #298 by moving the meat of the bitscan implementation to the limits header.
This seems unfortunate but is the smallest common denominator of
<numeric>and<bit>Also we cannot go without limits anyway because the implementation needs it.
Checklist
Be sure you've read README.md and understand the scope of this repo.
If you're unsure about a box, leave it unchecked. A maintainer will help you.
_Uglyas perhttps://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
verified by an STL maintainer before automated testing is enabled on GitHub,
leave this unchecked for initial submission).
members, adding virtual functions, changing whether a type is an aggregate
or trivially copyable, etc.).
the C++ Working Draft (including any cited standards), other WG21 papers
(excluding reference implementations outside of proposed standard wording),
and LWG issues as reference material. If they were derived from a project
that's already listed in NOTICE.txt, that's fine, but please mention it.
If they were derived from any other project (including Boost and libc++,
which are not yet listed in NOTICE.txt), you must mention it here,
so we can determine whether the license is compatible and what else needs
to be done.