Skip to content

Commit 65a082d

Browse files
TylerMSFTTylerMSFT
authored andcommitted
restore c5267.md
1 parent 5aa5f27 commit 65a082d

File tree

1 file changed

+4
-3
lines changed
  • docs/error-messages/compiler-warnings

1 file changed

+4
-3
lines changed

docs/error-messages/compiler-warnings/c5267.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ helpviewer_keywords: ["C5267"]
1111
1212
## Remarks
1313

14+
The C++ Standard deprecated (but didn't remove) the implicit generation of copy and assignment operators under some conditions. The MSVC compiler still generates the copy and assignment operators under those conditions, but may change its behavior in the future if the standard removes the deprecated behavior. The purpose of this warning is to help future proof your code if the committee decides to remove this functionality.
1415

15-
16-
This warning is off by default.
17-
This warning was introduced in Visual Studio 17.6
16+
The relevant sections in the C++ standard are:
17+
- [class.copy.ctor paragraph 6](https://eel.is/c++draft/class.copy.ctor#6), which says: "If the class definition does not explicitly declare a copy constructor, a nonexplicit one is declared implicitly. If the class definition declares a move constructor or move assignment operator, the implicitly declared copy constructor is defined as deleted; otherwise, it is defaulted. The latter case is deprecated if the class has a user-declared copy assignment operator or a user-declared destructor."
18+
- [Annex D D.8](https://eel.is/c++draft/depr.impldec#1), which says: "The implicit definition of a copy constructor as defaulted is deprecated if the class has a user-declared copy assignment operator or a user-declared destructor. The implicit definition of a copy assignment operator as defaulted is deprecated if the class has a user-declared copy constructor or a user-declared destructor. It's possible that future versions of C++ will specify that these implicit definitions are deleted."
1819

1920
## Example
2021

0 commit comments

Comments
 (0)