-
Notifications
You must be signed in to change notification settings - Fork 761
Fix debugger visualizer for Ext=gsl::dynamic_extent #857
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
Conversation
VS 2019 doesn't seem to match -1 for size_t template parameter, as a result dynamic span/basic_string_span/basic_zstring_span show extent as `extent = 4294967295` (for 32-bit builds). This change updates details::extent_type to have static constexpr size_ parameter for non-dynamic span/basic_string_span/basic_zstring_span and simplifies/removes dynamic versions from GSL.natvis fixes microsoft#856
JordanMaples
left a comment
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.
The change looks good, I suggest wrapping the definition for size_ in a debug check since the template arg is used for all other operations.
.natvis works in release as well, are you sure that wrapping it in ifdef |
|
Maintainers' call: While you're correct that the natvis works for debugging code build with release, the natvis is ultimately a debugging tool. GCC and Clang users won't get any benefit from the additional Please add the |
Can you please explain what kind of cost this change would introduce? It's a static variable, not much different than using template's |
|
It's not only |
I wanted to mention that inline consts would be even better, but GSL is C++14. I just realized that they are implicitly inline :) |
|
@pps83 let's use the static const. @CaseyCarter thanks for jumping in and clearing that up. |
VS 2019 doesn't seem to match -1 for size_t template parameter, as a result dynamic span/basic_string_span/basic_zstring_span show extent as
extent = 4294967295(for 32-bit builds). This change updates details::extent_type to have static constexpr size_ parameter for non-dynamic span/basic_string_span/basic_zstring_span and simplifies/removes dynamic versions from GSL.natvisfixes #856