From Jason Turner

[diff.cpp03.input.output]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp72lefblq/{from.md → to.md} +20 -22
tmp/tmp72lefblq/{from.md → to.md} RENAMED
@@ -1,35 +1,33 @@
1
- ### Clause [[input.output]]: input/output library <a id="diff.cpp03.input.output">[[diff.cpp03.input.output]]</a>
2
 
3
- [[istream::sentry]], [[ostream::sentry]], [[iostate.flags]] **Change:**
4
- Specify use of `explicit` in existing boolean conversion functions.
5
- **Rationale:** Clarify intentions, avoid workarounds. **Effect on
6
- original feature:** Valid C++03code that relies on implicit boolean
7
- conversions will fail to compile with this International Standard. Such
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
- [[ios::failure]] **Change:** Change base class of
17
- `std::ios_base::failure`. **Rationale:** More detailed error messages.
18
- **Effect on original feature:** `std::ios_base::failure` is no longer
19
- derived directly from `std::exception`, but is now derived from
20
- `std::system_error`, which in turn is derived from `std::runtime_error`.
21
- Valid C++03code that assumes that `std::ios_base::failure` is derived
22
- directly from `std::exception` may execute differently in this
23
- International Standard.
24
 
25
- [[ios.base]] **Change:** Flag types in `std::ios_base` are now bitmasks
26
- with values defined as constexpr static members. **Rationale:** Required
27
- for new features. **Effect on original feature:** Valid C++03code that
28
- relies on `std::ios_base` flag types being represented as `std::bitset`
29
- or as an integer type may fail to compile with this International
30
- Standard. For example:
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() {