File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1997
1997
\end {codeblock }
1998
1998
\end {example }
1999
1999
2000
+ \diffref {expr.typeid }
2001
+ \change
2002
+ Evaluation of operands in \keyword {typeid}.
2003
+ \rationale
2004
+ Introduce additional expression value categories.
2005
+ \effect
2006
+ Valid \CppIII {} code that uses xvalues as operands for \keyword {typeid}
2007
+ may change behavior in this revision of \Cpp {}.
2008
+ \begin {example }
2009
+ \begin {codeblock }
2010
+ void f() {
2011
+ struct B {
2012
+ B() {}
2013
+ virtual ~B() { }
2014
+ };
2015
+
2016
+ struct C { B b; };
2017
+ typeid(C().b); // unevaluated in \CppIII {}, evaluated in \CppXI {}
2018
+ }
2019
+ \end {codeblock }
2020
+ \end {example }
2021
+
2000
2022
\diffref {expr.mul }
2001
2023
\change
2002
2024
Specify rounding for results of integer \tcode {/} and \tcode {\% }.
2023
2045
\end {codeblock }
2024
2046
\end {example }
2025
2047
2048
+ \diffref {expr.cond }
2049
+ \change
2050
+ Fewer copies in the conditional operator.
2051
+ \rationale
2052
+ Introduce additional expression value categories.
2053
+ \effect
2054
+ Valid \CppIII {} code that uses xvalues as operands for the conditional operator
2055
+ may change behavior in this revision of \Cpp {}.
2056
+ \begin {example }
2057
+ \begin {codeblock }
2058
+ void f() {
2059
+ struct B {
2060
+ B() {}
2061
+ B(const B&) { }
2062
+ };
2063
+ struct D : B {};
2064
+
2065
+ struct BB { B b; };
2066
+ struct DD { D d; };
2067
+
2068
+ true ? BB().b : DD().d; // additional copy in \CppIII {}, no copy or move in \CppXI {}
2069
+ }
2070
+ \end {codeblock }
2071
+ \end {example }
2072
+
2026
2073
\rSec 2[diff.cpp03.dcl.dcl]{\ref {dcl.dcl }: declarations}
2027
2074
2028
2075
\diffref {dcl.spec }
You can’t perform that action at this time.
0 commit comments