tmp/tmp72lefblq/{from.md → to.md}
RENAMED
|
@@ -1,35 +1,33 @@
|
|
| 1 |
-
###
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
**
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
conversions occur in the following conditions:
|
| 9 |
|
| 10 |
- passing a value to a function that takes an argument of type `bool`;
|
| 11 |
- using `operator==` to compare to `false` or `true`;
|
| 12 |
- returning a value from a function with a return type of `bool`;
|
| 13 |
- initializing members of type `bool` via aggregate initialization;
|
| 14 |
-
- initializing a `const bool&` which would bind to a temporary.
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
International Standard.
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
|
| 32 |
``` cpp
|
| 33 |
#include <iostream>
|
| 34 |
|
| 35 |
int main() {
|
|
|
|
| 1 |
+
### [[input.output]]: input/output library <a id="diff.cpp03.input.output">[[diff.cpp03.input.output]]</a>
|
| 2 |
|
| 3 |
+
**Change:** Specify use of `explicit` in existing boolean conversion
|
| 4 |
+
functions. **Rationale:** Clarify intentions, avoid workarounds.
|
| 5 |
+
**Effect on original feature:** Valid C++03 code that relies on implicit
|
| 6 |
+
boolean conversions will fail to compile with this International
|
| 7 |
+
Standard. Such conversions occur in the following conditions:
|
|
|
|
| 8 |
|
| 9 |
- passing a value to a function that takes an argument of type `bool`;
|
| 10 |
- using `operator==` to compare to `false` or `true`;
|
| 11 |
- returning a value from a function with a return type of `bool`;
|
| 12 |
- initializing members of type `bool` via aggregate initialization;
|
| 13 |
+
- initializing a `const bool&` which would bind to a temporary object.
|
| 14 |
|
| 15 |
+
**Change:** Change base class of `std::ios_base::failure`.
|
| 16 |
+
**Rationale:** More detailed error messages. **Effect on original
|
| 17 |
+
feature:** `std::ios_base::failure` is no longer derived directly from
|
| 18 |
+
`std::exception`, but is now derived from `std::system_error`, which in
|
| 19 |
+
turn is derived from `std::runtime_error`. Valid C++03 code that assumes
|
| 20 |
+
that `std::ios_base::failure` is derived directly from `std::exception`
|
| 21 |
+
may execute differently in this International Standard.
|
|
|
|
| 22 |
|
| 23 |
+
**Change:** Flag types in `std::ios_base` are now bitmasks with values
|
| 24 |
+
defined as constexpr static members. **Rationale:** Required for new
|
| 25 |
+
features. **Effect on original feature:** Valid C++03 code that relies
|
| 26 |
+
on `std::ios_base` flag types being represented as `std::bitset` or as
|
| 27 |
+
an integer type may fail to compile with this International Standard.
|
| 28 |
+
For example:
|
| 29 |
|
| 30 |
``` cpp
|
| 31 |
#include <iostream>
|
| 32 |
|
| 33 |
int main() {
|