Skip to content

Document C2323 #4993

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

Merged
merged 4 commits into from
Mar 20, 2024
Merged

Document C2323 #4993

merged 4 commits into from
Mar 20, 2024

Conversation

Rageking8
Copy link
Contributor

Create dedicated page for error C2323.

Copy link
Contributor

@Rageking8 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Contributor

Learn Build status updates of commit e82960a:

✅ Validation status: passed

File Status Preview URL Details
docs/error-messages/compiler-errors-1/compiler-error-c2323.md ✅Succeeded
docs/error-messages/compiler-errors-1/compiler-errors-c2300-through-c2399.md ✅Succeeded
docs/error-messages/toc.yml ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

@ShannonLeavitt ShannonLeavitt added the aq-pr-triaged Tracking label for the PR review team label Mar 20, 2024
Copy link
Contributor

@Rageking8 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Collaborator

@TylerMSFT TylerMSFT left a comment

Choose a reason for hiding this comment

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

@Rageking8, thank you very much for all your contributions. I really value the improvements you are making!

Copy link
Contributor

Learn Build status updates of commit 8c9ee12:

✅ Validation status: passed

File Status Preview URL Details
docs/error-messages/compiler-errors-1/compiler-error-c2323.md ✅Succeeded
docs/error-messages/compiler-errors-1/compiler-errors-c2300-through-c2399.md ✅Succeeded
docs/error-messages/toc.yml ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

@TylerMSFT
Copy link
Collaborator

#sign-off

Copy link
Contributor

Learn Build status updates of commit f055e78:

✅ Validation status: passed

File Status Preview URL Details
docs/error-messages/compiler-errors-1/compiler-error-c2323.md ✅Succeeded
docs/error-messages/compiler-errors-1/compiler-errors-c2300-through-c2399.md ✅Succeeded
docs/error-messages/toc.yml ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

@ShannonLeavitt ShannonLeavitt merged commit 43c5bba into MicrosoftDocs:main Mar 20, 2024
---
# Compiler Error C2323

'identifier': non-member operator `new` or `delete` functions may not be declared `static` or in a namespace other than the global namespace.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should keywords in error messages have backticks or be shown verbatim (raw with no backticks)? Since what I commonly see is the latter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The goal is to prevent machine translation. We weren't good about this and got complaints about crazy machine translations for things that shouldn't be translated in the first place. So, we started adding the back ticks.


'identifier': non-member operator `new` or `delete` functions may not be declared `static` or in a namespace other than the global namespace.

The `new` and `delete` overload operators must be non-static, defined in the global namespace or as class members.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be more precise it should be "operator overloads" and not "overload operators".

In addition, with the placement of the comma, one possible misinterpretation of the sentence is that new/delete operator overloads which are class members must be non-static. That is false as those can be declared static and even if the static keyword is not explicitly used, it is always a static member.

I will address these issues in a follow-up PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's cool. It was just a bit verbose before.

Copy link
Contributor Author

@Rageking8 Rageking8 Mar 21, 2024

Choose a reason for hiding this comment

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

Maybe we can split it into 2 lines, one for the case where it is in the global namespace (emphasis on must be non-static), and the other is for class members (emphasis on optional static keyword and it being always static).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good idea

@Rageking8 Rageking8 deleted the document-c2323 branch March 27, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants