-
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
<functional>
: add noreturn
for !_HAS_STATIC_RTTI
#3882
<functional>
: add noreturn
for !_HAS_STATIC_RTTI
#3882
Conversation
This is failing code format validation because we require all files in the repo to be clang-formatted (with the latest version included in VS Preview). You can configure your editor to clang-format on save; for VSCode you can use either the Microsoft C/C++ Extension or xaver's clang-format extension, setting
or
respectively, and then opening the repo as a workspace will automatically configure format-on-save for C++ files (due to the repo's You can also manually clang-format files before pushing changes, but we recommend against this; missing files is likely this way, and submitting PRs that fail validation consumes CI system resources which are limited. What clang-format wants to do here looks kind of weird but it isn't worth the effort to suppress. |
There are another two usages that call Line 1416 in f51733c
Line 887 in f51733c
|
@achabense Thanks! I'd like to handle that in a separate PR, as this PR is very close to the (undocumented) "de minimis" threshold for requiring the CLA to be signed. Would you like to create one?
|
I wonder whether it'll be better to use |
Or, should we devise a new macro to express the meaning("should not be called at runtime") more exactly? |
I'd like to help, but I think this needs a lot of decisions. I've made an issue(#3888) about this. For this pr, I think the following version well be better, as it's more readable imo, takes up less lines, and is easer to refactor in the future: #if _HAS_STATIC_RTTI
const type_info& _Target_type() const noexcept override {
return typeid(_Callable);
}
#else // _HAS_STATIC_RTTI
[[noreturn]] const type_info& _Target_type() const noexcept override {
_CSTD abort();
}
#endif // _HAS_STATIC_RTTI |
That's a reasonable suggestion but I'd like to handle that in a followup PR, again due to the "de minimis" threshold. |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for this consistency improvement and congratulations on your first microsoft/STL commit! 🚀 😺 🎉 |
No description provided.