Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented Apr 8, 2020

  • 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 #313 (comment).)

* 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).)
@CaseyCarter CaseyCarter added the bug Something isn't working label Apr 8, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner April 8, 2020 15:35
@CaseyCarter CaseyCarter self-assigned this Apr 8, 2020
@StephanTLavavej StephanTLavavej changed the title <yvals_core.h>: Cleanup <bit> feature-test macros <yvals_core.h>: Fix <bit> feature-test macros Apr 9, 2020
Comment on lines +1114 to +1116
#ifdef __cpp_lib_bitops // TRANSITION, VSO-1020212
#define __cpp_lib_int_pow2 202002L
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I observe that <bit> guards its non-bit_cast content with #ifdef __cpp_lib_bitops // TRANSITION, VSO-1020212 instead of having separate sections for that and __cpp_lib_int_pow2. This is fine, but I thought I'd mention it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I wrote the guard before __cpp_lib_int_pow2 was a thing.

@CaseyCarter CaseyCarter requested a review from barcharcraz April 9, 2020 20:08
@CaseyCarter CaseyCarter merged commit 0055b5b into microsoft:master Apr 10, 2020
@CaseyCarter CaseyCarter deleted the pow2 branch April 10, 2020 02:27
@CaseyCarter CaseyCarter removed their assignment Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants