From Jason Turner

[diff.cpp03.input.output]

Diff to HTML by rtfpessoa

tmp/tmprv66lh0e/{from.md → to.md} RENAMED
@@ -1,9 +1,9 @@
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 operators
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
 
@@ -12,20 +12,20 @@ conversions occur in the following conditions:
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
 
@@ -33,9 +33,8 @@ Standard. For example:
33
  #include <iostream>
34
 
35
  int main() {
36
  int flag = std::ios_base::hex;
37
  std::cout.setf(flag); // error: setf does not take argument of type int
38
- return 0;
39
  }
40
  ```
41
 
 
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
 
 
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
 
 
33
  #include <iostream>
34
 
35
  int main() {
36
  int flag = std::ios_base::hex;
37
  std::cout.setf(flag); // error: setf does not take argument of type int
 
38
  }
39
  ```
40