-
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
<bit>: Activate __cpp_lib_bitops for MSVC #313
Comments
Thanks for all the hard work. However
From a user point of view it is a bit confusing that IntelliSense (in MSVC mode) happily auto completes/goes to the definition of the affected overload sets. While |
That is awkward; we should probably guard functionality that works in EDG but not MSVC with |
I think I'd prefer to just drop |
I'm confused about Currently, What is the difference? |
* Don't define `__cpp_lib_bitops` when `__EDG__`, so IntelliSense is consistent with MSVC * Don't define `__cpp_lib_int_pow2` when `__cpp_lib_bitops` isn't defined since the facilities that correspond with `__cpp_lib_int_pow2` are only provided when `__cpp_lib_bitops` is defined. (See discussion starting at microsoft#313 (comment).)
When you need to know the history of a feature-test macro, or what features are covered by a feature-test macro, go straight to WG21 Standing Document 6 (SD-6). It is roughly 1000 times more useful than the working draft, which simply tells you what macros a conforming C++20 implementation defines and with what values.
The implementations of all of these functions rely on intrinsics that Clang supports but MSVC does not. We conditionally define |
* Don't define `__cpp_lib_bitops` when `__EDG__`, so IntelliSense is consistent with MSVC * Don't define `__cpp_lib_int_pow2` when `__cpp_lib_bitops` isn't defined since the facilities that correspond with `__cpp_lib_int_pow2` are only provided when `__cpp_lib_bitops` is defined. * Update feature-test macro test accordingly (See discussion starting at #313 (comment).)
This was fixed by the merge of #795. |
#310 implemented #25 and #26:
<bit>
Rotating And Counting Functions<bit>
ispow2()
,ceil2()
,floor2()
,log2p1()
bit_length()
This is currently active for Clang (and EDG, used for IntelliSense), but not MSVC, due to compiler support that has not yet been implemented:
STL/stl/inc/yvals_core.h
Lines 952 to 957 in 1980e1a
When this compiler support is available, we should activate these features for MSVC.
The text was updated successfully, but these errors were encountered: