|
1777 | 1777 | \indextext{operator!move assignment|see{assignment operator, move}}%
|
1778 | 1778 | A user-declared \term{copy} assignment operator \tcode{X::operator=} is a
|
1779 | 1779 | non-static non-template member function of class \tcode{X} with exactly one
|
1780 |
| -parameter of type \tcode{X}, \tcode{X\&}, \tcode{const} \tcode{X\&}, |
1781 |
| -\tcode{volatile} \tcode{X\&} or \tcode{const} \tcode{volatile} |
1782 |
| -\tcode{X\&}.\footnote{Because a template assignment operator or an assignment |
1783 |
| -operator taking an rvalue reference parameter is never a copy assignment |
1784 |
| -operator, the presence of such an assignment operator does not suppress the |
| 1780 | +parameter of type \tcode{X}, \tcode{X\&}, \tcode{const X\&}, |
| 1781 | +\tcode{volatile X\&}, or \tcode{const volatile X\&}.\footnote{Because |
| 1782 | +a template assignment operator or an assignment operator |
| 1783 | +taking an rvalue reference parameter is never a copy assignment operator, |
| 1784 | +the presence of such an assignment operator does not suppress the |
1785 | 1785 | implicit declaration of a copy assignment operator. Such assignment operators
|
1786 | 1786 | participate in overload resolution with other assignment operators, including
|
1787 | 1787 | copy assignment operators, and, if selected, will be used to assign an object.}
|
|
1838 | 1838 |
|
1839 | 1839 | \begin{itemize}
|
1840 | 1840 | \item
|
1841 |
| -each direct base class |
1842 |
| -\tcode{B} |
1843 |
| -of |
1844 |
| -\tcode{X} |
| 1841 | +each direct base class \tcode{B} of \tcode{X} |
1845 | 1842 | has a copy assignment operator whose parameter is of type
|
1846 |
| -\tcode{const} |
1847 |
| -\tcode{B\&}, |
1848 |
| -\tcode{const} |
1849 |
| -\tcode{volatile} |
1850 |
| -\tcode{B\&} |
1851 |
| -or |
1852 |
| -\tcode{B}, |
1853 |
| -and |
| 1843 | +\tcode{const B\&}, \tcode{const volatile B\&}, or \tcode{B}, and |
1854 | 1844 | \item
|
1855 |
| -for all the non-static data members of |
1856 |
| -\tcode{X} |
1857 |
| -that are of a class type |
1858 |
| -\tcode{M} |
1859 |
| -(or array thereof), |
| 1845 | +for all the non-static data members of \tcode{X} |
| 1846 | +that are of a class type \tcode{M} (or array thereof), |
1860 | 1847 | each such class type has a copy assignment operator whose parameter is of type
|
1861 |
| -\tcode{const} |
1862 |
| -\tcode{M\&}, |
1863 |
| -\tcode{const} |
1864 |
| -\tcode{volatile} |
1865 |
| -\tcode{M\&} |
1866 |
| -or |
1867 |
| -\tcode{M}.\footnote{This implies that the reference parameter of the |
| 1848 | +\tcode{const M\&}, \tcode{const volatile M\&}, |
| 1849 | +or \tcode{M}.\footnote{This implies that the reference parameter of the |
1868 | 1850 | implicitly-declared copy assignment operator cannot bind to a
|
1869 |
| -\tcode{volatile} |
1870 |
| -lvalue; see~\ref{diff.class}.} |
| 1851 | +\tcode{volatile} lvalue; see~\ref{diff.class}.} |
1871 | 1852 | \end{itemize}
|
1872 | 1853 |
|
1873 |
| -Otherwise, the implicitly-declared copy |
1874 |
| -assignment operator |
| 1854 | +Otherwise, the implicitly-declared copy assignment operator |
1875 | 1855 | will have the form
|
1876 | 1856 |
|
1877 | 1857 | \begin{codeblock}
|
|
0 commit comments