|
631 | 631 | Improve consistency of equality with three-way comparison
|
632 | 632 | and make it easier to write the full complement of equality operations.
|
633 | 633 | \effect
|
634 |
| -Equality and inequality expressions between two objects of different types, |
635 |
| -where one is convertible to the other, |
636 |
| -could invoke a different operator. |
637 |
| -Equality and inequality expressions between two objects of the same type |
638 |
| -could become ambiguous. |
| 634 | +For certain pairs of types where one is convertible to the other, |
| 635 | +equality or inequality expressions between an object of one type |
| 636 | +and an object of the other type invoke a different operator. |
| 637 | +Also, for certain types, equality or inequality expressions |
| 638 | +between two objects of that type become ambiguous. |
639 | 639 | For example:
|
640 | 640 | \begin{codeblock}
|
641 | 641 | struct A {
|
|
921 | 921 | \change
|
922 | 922 | Remove \tcode{raw_storage_iterator}.
|
923 | 923 | \rationale
|
924 |
| -The iterator encouraged use of algorithms that might throw exceptions, but did |
925 |
| -not return the number of elements successfully constructed that might need to |
926 |
| -be destroyed in order to avoid leaks. |
| 924 | +The iterator encouraged use of potentially-throwing algorithms, but did |
| 925 | +not return the number of elements successfully constructed, |
| 926 | +as would be necessary to destroy them. |
927 | 927 | \effect
|
928 | 928 | A valid \CppXVII{} program that uses this iterator class may fail to compile.
|
929 | 929 |
|
|
958 | 958 | The traits had unreliable or awkward interfaces. The \tcode{is_literal_type}
|
959 | 959 | trait provided no way to detect which subset of constructors and member
|
960 | 960 | functions of a type were declared \keyword{constexpr}. The \tcode{result_of}
|
961 |
| -trait had a surprising syntax that could not report the result of a regular |
962 |
| -function type. It has been superseded by the \tcode{invoke_result} trait. |
| 961 | +trait had a surprising syntax that did not directly support function types. |
| 962 | +It has been superseded by the \tcode{invoke_result} trait. |
963 | 963 | \effect
|
964 | 964 | A valid \CppXVII{} program that relies on the \tcode{is_literal_type} or
|
965 | 965 | \tcode{result_of} type traits, on the \tcode{is_literal_type_v} variable template,
|
|
1019 | 1019 | \effect
|
1020 | 1020 | A valid \CppXIV{} expression utilizing the increment operator on
|
1021 | 1021 | a \tcode{bool} lvalue is ill-formed in this revision of \Cpp{}.
|
1022 |
| -Note that this might occur when the lvalue has a type given by a template |
1023 |
| -parameter. |
1024 | 1022 |
|
1025 | 1023 | \diffref{expr.new,expr.delete}
|
1026 | 1024 | \change
|
|
1694 | 1692 | \rationale
|
1695 | 1693 | Overly constrained, simplify overload resolution rules.
|
1696 | 1694 | \effect
|
1697 |
| -A valid \CppIII{} program could get a different result than in this |
| 1695 | +A valid \CppIII{} program can get a different result in this |
1698 | 1696 | revision of \Cpp{}.
|
1699 | 1697 |
|
1700 | 1698 | \rSec2[diff.cpp03.library]{\ref{library}: library introduction}
|
|
2354 | 2352 | block.
|
2355 | 2353 | Allowing jump past initializers would require
|
2356 | 2354 | complicated runtime determination of allocation.
|
2357 |
| -Furthermore, any use of the uninitialized object could be a |
2358 |
| -disaster. |
| 2355 | +Furthermore, many operations on such an uninitialized object |
| 2356 | +have undefined behavior. |
2359 | 2357 | With this simple compile-time rule, \Cpp{} assures that
|
2360 | 2358 | if an initialized variable is in scope, then it has assuredly been
|
2361 | 2359 | initialized.
|
|
2411 | 2409 | with a type.
|
2412 | 2410 | In \Cpp{}, class members can be declared with the \keyword{static} storage
|
2413 | 2411 | class specifier.
|
2414 |
| -Allowing storage class specifiers on type |
2415 |
| -declarations could render the code confusing for users. |
| 2412 | +Storage class specifiers on type |
| 2413 | +declarations can be confusing for users. |
2416 | 2414 | \effect
|
2417 | 2415 | Deletion of semantically well-defined feature.
|
2418 | 2416 | \difficulty
|
|
2786 | 2784 | \indextext{bit-field!implementation-defined sign of}%
|
2787 | 2785 | Bit-fields of type plain \keyword{int} are signed.
|
2788 | 2786 | \rationale
|
2789 |
| -Leaving the choice of signedness to implementations could lead to |
2790 |
| -inconsistent definitions of template specializations. For consistency, |
| 2787 | +The signedness needs to be consistent among template specializations. |
| 2788 | +For consistency, |
2791 | 2789 | the implementation freedom was eliminated for non-dependent types,
|
2792 | 2790 | too.
|
2793 | 2791 | \effect
|
|
0 commit comments