-
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
<numbers>
: Rework the implementation when concepts are missing
#3633
<numbers>
: Rework the implementation when concepts are missing
#3633
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.
Minor change, but otherwise this looks great :)
Rename `_Reject_primary_template(_t)` to `_Reject_invalid(_t)`. Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
Thanks, I think this is a nice improvement! For the future, note that the non-concepts mode exists only for the STL's test suite. (By special agreement with the IDE team, we enable concepts code for actual IntelliSense, which doesn't need to deeply instantiate templates the way that |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
🔢 🔢 🔢 |
In recent PR #3623 I noticed that the implementation of
<numbers>
when concepts are unavailable didn't seem correct enough. These variable templates are required to support possibly cv-qualified floating-point types due tostd::floating_point
, but the current concept-free implementation only supports cv-unqualified FP types.This PR is adding test coverage for cv-qualified FP types, and rewriting the concept-free implementation. Technically, only the primary template is used, but I believe that the difference from the standard wording is unobservable.
Warning C4197 was encountered during local test. I think it's OK to only suppress that warning in testing, because it's already weird to use something that is both
constexpr
andvolatile
.