Skip to content
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

Correct misuses of __has_cpp_attribute #4812

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 18, 2024

  1. Correct misuses of __has_cpp_attribute

    `__has_cpp_attribute` is for detecting support for attribute-tokens like `fallthrough` or `unlikely`. This queries with feature-test macro names are always going to fail: no implementation will ever support an attribute-token with the same name as a feature-test macro. Given the conditional use of library facilities, the intent here was clearly to test the feature-test macros to determine support for those facilities, so let's do that instead.
    
    I've also fixed the using-declaration for `std::to_underlying`.
    
    Drive-by: Removed extraneous `inline` in the definition of the `constexpr` `to_underlying` fallback; `constexpr` functions are implicitly inline.
    CaseyCarter authored Oct 18, 2024
    Configuration menu
    Copy the full SHA
    9674843 View commit details
    Browse the repository at this point in the history
  2. Correct typo

    CaseyCarter authored Oct 18, 2024
    Configuration menu
    Copy the full SHA
    42d848e View commit details
    Browse the repository at this point in the history