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