File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 18271827For the purpose of ranking implicit conversion sequences as described
18281828in~\ref {over.ics.rank }, the ambiguous conversion sequence is treated
18291829as a user-defined sequence that is indistinguishable from any
1830- other user-defined conversion sequence\footnote {The ambiguous conversion
1830+ other user-defined conversion sequence\cprotect \ footnote {The ambiguous conversion
18311831sequence is ranked with user-defined
18321832conversion sequences because multiple conversion sequences
18331833for an argument can exist only if they involve different
18421842conversion sequence for one of its parameters.
18431843Consider this example,
18441844
1845- \begin {ttfamily }
1846- \begin {tabbing }
1847- \hspace {2in}\= \kill %
1848- \indent class B;\\
1849- \indent class A \{ A (B\& );\} ;\\
1850- \indent class B \{ operator A (); \} ;\\
1851- \indent class C \{ C (B\& ); \} ;\\
1852- \indent void f(A) \{ \} \\
1853- \indent void f(C) \{ \} \\
1854- \indent B b;\\
1855- \indent f(b);\> \textrm {// ambiguous because \tcode {b} $ \to $ \tcode {C} via constructor and}\\
1856- \indent \> \textrm {// \tcode {b} $ \to $ \tcode {A} via constructor or conversion function.}
1857- \end {tabbing }
1858- \end {ttfamily }
1845+ \begin {codeblock }
1846+ class B;
1847+ class A { A (B&); };
1848+ class B { operator A (); };
1849+ class C { C (B&); };
1850+ void f(A) { }
1851+ void f(C) { }
1852+ B b;
1853+ f(b); // ambiguous because \tcode {b} $ \to $ \tcode {C} via constructor and
1854+ // \tcode {b} $ \to $ \tcode {A} via constructor or conversion function.
1855+ \end {codeblock }
18591856
18601857If it were not for this rule,
18611858\tcode {f(A)}
Original file line number Diff line number Diff line change 289289\tcode {\# elif}
290290directive)
291291is \impldef {numeric values of character literals in \tcode {\# if}
292- directives}.\footnote {Thus, the constant expression in the following
292+ directives}.\cprotect \ footnote {Thus, the constant expression in the following
293293\tcode {\# if}
294294directive and
295295\tcode {if}
296296statement is not guaranteed to evaluate to the same value in these two
297297contexts.
298- \begin {tabbing }
299- \hspace {.6in}\= \kill %
300- \> \tcode {\# if 'z' - 'a' == 25}\\
301- \> \tcode {if ('z' - 'a' == 25)}
302- \end {tabbing }
298+ \begin {codeblock }
299+ #if 'z' - 'a' == 25
300+ if ('z' - 'a' == 25)
301+ \end {codeblock }
303302}
304303Also, whether a single-character character literal may have a negative
305304value is \impldef {negative value of character literal in preprocessor}.
Original file line number Diff line number Diff line change 4545 plainpages=false
4646 ]{hyperref}
4747\usepackage {memhfixc } % fix interactions between hyperref and memoir
48+ \usepackage {cprotect } % support for listings inside footnotes
4849
4950\input {layout }
5051\input {styles }
You can’t perform that action at this time.
0 commit comments