Files
cppdraft_translate/cppdraft/depr/impldec.md
2025-10-25 03:02:53 +03:00

21 lines
1020 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[depr.impldec]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.6 Implicit declaration of copy functions [depr.impldec]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L134)
The implicit definition of a [copy constructor](class.copy.ctor "11.4.5.3Copy/move constructors[class.copy.ctor]") as defaulted is deprecated if the class has
a user-declared copy assignment operator or
a user-declared [destructor](class.dtor "11.4.7Destructors[class.dtor]")[.](#1.sentence-1)
The implicit definition of a [copy assignment operator](class.copy.assign "11.4.6Copy/move assignment operator[class.copy.assign]") as defaulted is deprecated if the class has
a user-declared copy constructor or
a user-declared destructor[.](#1.sentence-2)
It is possible that future versions of C++ will specify
that these implicit definitions are deleted ([[dcl.fct.def.delete]](dcl.fct.def.delete "9.6.3Deleted definitions"))[.](#1.sentence-3)