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

Avoid unwanted sign extensions from MSVC in is_utf8. #2297

Merged
merged 2 commits into from
May 19, 2021

Commits on May 19, 2021

  1. Avoid unwanted sign extensions from MSVC in is_utf8.

    Microsoft's constexpr evaluator treats the type of micro[0] and micro[1] as
    plain char, and so sign extends before comparing them to ints.
    The normal compiler, including the optimizer, does not fail in this way,
    so this is merely a "future proof" change in case someone uses is_utf8()
    in a constant expression.
    mwinterb committed May 19, 2021
    Configuration menu
    Copy the full SHA
    a69c324 View commit details
    Browse the repository at this point in the history
  2. addressing nits.

    mwinterb committed May 19, 2021
    Configuration menu
    Copy the full SHA
    df4b627 View commit details
    Browse the repository at this point in the history