|
2059 | 2059 | void h() {
|
2060 | 2060 | F f;
|
2061 | 2061 | A* ap = &f; // succeeds: finds unique \tcode{A}
|
2062 |
| - D* dp = dynamic_cast<D*>(ap); // fails: yields \tcode{0} |
2063 |
| - // \tcode{f} has two \tcode{D} subobjects |
| 2062 | + D* dp = dynamic_cast<D*>(ap); // fails: yields null; \tcode{f} has two \tcode{D} subobjects |
2064 | 2063 | E* ep = (E*)ap; // ill-formed: cast from virtual base
|
2065 | 2064 | E* ep1 = dynamic_cast<E*>(ap); // succeeds
|
2066 | 2065 | }
|
|
2571 | 2570 | typedef const int *const CA[3]; // array of 3 const pointer to \tcode{const int}
|
2572 | 2571 |
|
2573 | 2572 | CA &&r = A{}; // OK, reference binds to temporary array object after qualification conversion to type \tcode{CA}
|
2574 |
| -A &&r1 = const_cast<A>(CA{}); // error: temporary array decayed to pointer |
2575 |
| -A &&r2 = const_cast<A&&>(CA{}); // OK |
| 2573 | +A &&r1 = const_cast<A>(CA{}); // error: temporary array decayed to pointer |
| 2574 | +A &&r2 = const_cast<A&&>(CA{}); // OK |
2576 | 2575 | \end{codeblock}
|
2577 | 2576 | \end{example}
|
2578 | 2577 |
|
|
2953 | 2952 | \indexlibrary{\idxcode{size_t}}%
|
2954 | 2953 | \tcode{std::size_t} is defined in the standard header
|
2955 | 2954 | \indextext{\idxhdr{cstddef}}%
|
2956 |
| -\tcode{<cstddef>}~(\ref{support.types}). |
| 2955 | +\tcode{<cstddef>}~(\ref{cstddef.syn}, \ref{support.types.layout}). |
2957 | 2956 | \end{note}
|
2958 | 2957 |
|
2959 | 2958 | \rSec2[expr.new]{New}
|
|
4674 | 4673 | // ...
|
4675 | 4674 | } catch (...) { // catch all exceptions
|
4676 | 4675 | // respond (partially) to exception
|
4677 |
| - throw; // pass the exception to some |
4678 |
| - // other handler |
| 4676 | + throw; // pass the exception to some other handler |
4679 | 4677 | }
|
4680 | 4678 | \end{codeblock}
|
4681 | 4679 | \end{example}
|
|
4789 | 4787 |
|
4790 | 4788 | \pnum
|
4791 | 4789 | A \grammarterm{braced-init-list} may appear on the right-hand side of
|
4792 |
| - |
4793 | 4790 | \begin{itemize}
|
4794 | 4791 | \item an assignment to a scalar, in which case the initializer list shall have
|
4795 |
| -at most a single element. The meaning of \tcode{x=\{v\}}, where \tcode{T} is the |
4796 |
| -scalar type of the expression \tcode{x}, is that of \tcode{x=T\{v\}}. The meaning of |
4797 |
| -\tcode{x=\{\}} is \tcode{x=T\{\}}. |
| 4792 | +at most a single element. The meaning of \tcode{x = \{v\}}, where \tcode{T} is the |
| 4793 | +scalar type of the expression \tcode{x}, is that of \tcode{x = T\{v\}}. The meaning of |
| 4794 | +\tcode{x = \{\}} is \tcode{x = T\{\}}. |
4798 | 4795 |
|
4799 | 4796 | \item an assignment to an object of class type, in which case the initializer
|
4800 | 4797 | list is passed as the argument to the assignment operator function selected by
|
4801 | 4798 | overload resolution~(\ref{over.ass}, \ref{over.match}).
|
4802 | 4799 | \end{itemize}
|
4803 |
| - |
4804 | 4800 | \begin{example}
|
4805 | 4801 | \begin{codeblock}
|
4806 | 4802 | complex<double> z;
|
|
0 commit comments