Skip to content

Commit c40ec45

Browse files
authored
Update c5267.md
last edits
1 parent d06090a commit c40ec45

File tree

1 file changed

+1
-1
lines changed
  • docs/error-messages/compiler-warnings

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ helpviewer_keywords: ["C5267"]
1111
1212
## Remarks
1313

14-
Since C++11, the C++ Standard deprecated (but did not remove) implicitly generating the copy constructor or copy assignment operator when only or the other is explicitly defined. The MSVC compiler continues to implicitly generate the copy constructor and copy assignment assignement operator when not explicitly defined. The purpose of this warning is to help users future proof their code if the committee decides to remove this functionality, instead of just deprecate it.
14+
The C++ Standard deprecated (but did not 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.
1515

1616
The relevant sections in the C++ standard are:
1717
- [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 non-explicit 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."

0 commit comments

Comments
 (0)