Skip to content

Commit 3a0d274

Browse files
committed
CWG2895 Initialization should ignore the destination type's cv-qualification
1 parent d9094e0 commit 3a0d274

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/declarations.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4705,7 +4705,7 @@
47054705
The
47064706
\indextext{type!destination}%
47074707
\term{destination type}
4708-
is the type of the object or reference being initialized and the
4708+
is the cv-unqualified type of the object or reference being initialized and the
47094709
\term{source type}
47104710
is the type of the initializer expression.
47114711
If the initializer is not a single (possibly parenthesized) expression, the
@@ -4766,21 +4766,21 @@
47664766
is sequenced before those associated with
47674767
the initialization of the $j^\text{th}$ element.
47684768
\item
4769-
Otherwise, if the destination type is a (possibly cv-qualified) class type:
4769+
Otherwise, if the destination type is a class type:
47704770

47714771
\begin{itemize}
47724772
\item
47734773
If the initializer expression is a prvalue
47744774
and the cv-unqualified version of the source type
4775-
is the same class as the class of the destination,
4775+
is the same as the destination type,
47764776
the initializer expression is used to initialize the destination object.
47774777
\begin{example}
47784778
\tcode{T x = T(T(T()));} value-initializes \tcode{x}.
47794779
\end{example}
47804780
\item
47814781
Otherwise, if the initialization is direct-initialization,
47824782
or if it is copy-initialization where the cv-unqualified version of the source
4783-
type is the same class as, or a derived class of, the class of the destination,
4783+
type is the same as or is derived from the class of the destination type,
47844784
constructors are considered.
47854785
The applicable constructors
47864786
are enumerated\iref{over.match.ctor}, and the best one is chosen
@@ -4877,7 +4877,7 @@
48774877
the (possibly converted) value of the initializer expression.
48784878
A standard conversion sequence\iref{conv} is used
48794879
to convert the initializer expression to
4880-
a prvalue of the cv-unqualified version of
4880+
a prvalue of
48814881
the destination type;
48824882
no user-defined conversions are considered.
48834883
If the conversion cannot

0 commit comments

Comments
 (0)