|
1550 | 1550 | \pnum
|
1551 | 1551 | \indextext{conversion!overload resolution and}%
|
1552 | 1552 | Define ICS\textit{i}(\tcode{F}) as follows:
|
1553 |
| - |
1554 | 1553 | \begin{itemize}
|
1555 | 1554 | \item
|
1556 |
| -if |
| 1555 | +If |
1557 | 1556 | \tcode{F}
|
1558 | 1557 | is a static member function, ICS\textit{1}(\tcode{F}) is defined such that
|
1559 | 1558 | ICS\textit{1}(\tcode{F}) is neither better nor worse than ICS\textit{1}(\tcode{G})
|
1560 | 1559 | for any function
|
1561 | 1560 | \tcode{G},
|
1562 | 1561 | and, symmetrically, ICS\textit{1}(\tcode{G}) is neither better nor worse than
|
1563 |
| -ICS\textit{1}(\tcode{F})\footnote{If a function is a static member function, this |
| 1562 | +ICS\textit{1}(\tcode{F});\footnote{If a function is a static member function, this |
1564 | 1563 | definition means that the first argument, the implied object argument,
|
1565 | 1564 | has no effect in the determination of whether the function is better
|
1566 |
| -or worse than any other function.}; |
| 1565 | +or worse than any other function.} |
1567 | 1566 | otherwise,
|
1568 | 1567 | \item
|
1569 | 1568 | let ICS\textit{i}(\tcode{F}) denote the implicit conversion sequence that converts
|
|
1591 | 1590 | ICS\textit{i}(\tcode{F1}) is not a worse conversion
|
1592 | 1591 | sequence than ICS\textit{i}(\tcode{F2}), and then
|
1593 | 1592 | \begin{itemize}
|
1594 |
| - |
1595 | 1593 | \item
|
1596 | 1594 | for some argument
|
1597 | 1595 | \textit{j},
|
|
1608 | 1606 | is a better conversion sequence than the standard conversion sequence
|
1609 | 1607 | from the return type of
|
1610 | 1608 | \tcode{F2}
|
1611 |
| -to the destination type. |
| 1609 | +to the destination type |
1612 | 1610 | \begin{example}
|
1613 | 1611 | \begin{codeblock}
|
1614 | 1612 | struct A {
|
|
1629 | 1627 | return type of \tcode{F1} is the same kind of reference (i.e. lvalue or rvalue)
|
1630 | 1628 | as the reference being initialized, and the return type of \tcode{F2} is not
|
1631 | 1629 | \begin{example}
|
1632 |
| - |
1633 | 1630 | \begin{codeblock}
|
1634 | 1631 | template <class T> struct A {
|
1635 | 1632 | operator T&(); // \#1
|
|
1640 | 1637 | Fn& lf = a; // calls \#1
|
1641 | 1638 | Fn&& rf = a; // calls \#2
|
1642 | 1639 | \end{codeblock}
|
1643 |
| - |
1644 | 1640 | \end{example}
|
1645 | 1641 | or, if not that,
|
1646 | 1642 |
|
|
2409 | 2405 | neither refers to an implicit object parameter of a non-static member function
|
2410 | 2406 | declared without a \grammarterm{ref-qualifier},
|
2411 | 2407 | and \tcode{S1} binds an rvalue reference to an
|
2412 |
| -rvalue and \tcode{S2} binds an lvalue reference. |
2413 |
| - |
| 2408 | +rvalue and \tcode{S2} binds an lvalue reference |
2414 | 2409 | \begin{example}
|
2415 | 2410 | \begin{codeblock}
|
2416 | 2411 | int i;
|
|
2442 | 2437 | \item
|
2443 | 2438 | \tcode{S1} and \tcode{S2} are reference bindings~(\ref{dcl.init.ref}) and
|
2444 | 2439 | \tcode{S1} binds an lvalue reference to a function lvalue and \tcode{S2} binds
|
2445 |
| -an rvalue reference to a function lvalue. \begin{example} |
| 2440 | +an rvalue reference to a function lvalue |
| 2441 | +\begin{example} |
2446 | 2442 | \begin{codeblock}
|
2447 | 2443 | int f(void(&)()); // \#1
|
2448 | 2444 | int f(void(&&)()); // \#2
|
|
2462 | 2458 | \tcode{T2}~(\ref{conv.qual}), respectively, and the cv-qualification signature of type
|
2463 | 2459 | \tcode{T1}
|
2464 | 2460 | is a proper subset of the cv-qualification signature of type
|
2465 |
| -\tcode{T2}. |
| 2461 | +\tcode{T2} |
2466 | 2462 | \begin{example}
|
2467 |
| - |
2468 | 2463 | \begin{codeblock}
|
2469 | 2464 | int f(const volatile int *);
|
2470 | 2465 | int f(const int *);
|
|
2486 | 2481 | \tcode{S1}
|
2487 | 2482 | refers.
|
2488 | 2483 | \begin{example}
|
2489 |
| - |
2490 | 2484 | \begin{codeblock}
|
2491 | 2485 | int f(const int &);
|
2492 | 2486 | int f(int &);
|
|
0 commit comments