Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fatal error making less C for C++20. #574

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

devnexen
Copy link
Collaborator

@devnexen devnexen commented Dec 4, 2022

No description provided.

Copy link
Member

@mjp41 mjp41 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. This looks great.

@mjp41 mjp41 merged commit dd3f4a9 into microsoft:main Dec 9, 2022
@davidchisnall
Copy link
Collaborator

The version check added in this PR is incorrect and is causing breakage with clang 15. The source_location header is not present until 16.

It's also incredibly fragile to assume that compiler version implies C++ standard library version. C++ has a standard mechanism for checking these features. We should do:

#ifdef __cpp_lib_source_location

We might also want to check that __cpp_lib_source_location >= 201907L, but we can probably work with an older pre-standard version for this limited use.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants