From Jason Turner

[syncstream.osyncstream]

Diff to HTML by rtfpessoa

tmp/tmpl_70u14l/{from.md → to.md} RENAMED
@@ -6,13 +6,13 @@
6
  namespace std {
7
  template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
8
  class basic_osyncstream : public basic_ostream<charT, traits> {
9
  public:
10
  using char_type = charT;
11
- using int_type = typename traits::int_type;
12
- using pos_type = typename traits::pos_type;
13
- using off_type = typename traits::off_type;
14
  using traits_type = traits;
15
 
16
  using allocator_type = Allocator;
17
  using streambuf_type = basic_streambuf<charT, traits>;
18
  using syncbuf_type = basic_syncbuf<charT, traits, Allocator>;
@@ -77,12 +77,12 @@ In this example, `cout` is not flushed.
77
 
78
  ``` cpp
79
  basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
80
  ```
81
 
82
- *Effects:* Initializes `sb` from `buf` and `allocator`. Initializes the
83
- base class with `basic_ostream<charT, traits>(addressof(sb))`.
84
 
85
  [*Note 1*: The member functions of the provided stream buffer can be
86
  called from `emit()` while a lock is held, which might result in a
87
  deadlock if used incautiously. — *end note*]
88
 
@@ -90,13 +90,13 @@ deadlock if used incautiously. — *end note*]
90
 
91
  ``` cpp
92
  basic_osyncstream(basic_osyncstream&& other) noexcept;
93
  ```
94
 
95
- *Effects:* Move constructs the base class and `sb` from the
96
  corresponding subobjects of `other`, and calls
97
- `basic_ostream<charT, traits>::set_rdbuf(addressof(sb))`.
98
 
99
  *Ensures:* The value returned by `get_wrapped()` is the value returned
100
  by `other.get_wrapped()` prior to calling this constructor.
101
  `nullptr == other.get_wrapped()` is `true`.
102
 
@@ -106,11 +106,11 @@ by `other.get_wrapped()` prior to calling this constructor.
106
  void emit();
107
  ```
108
 
109
  *Effects:* Behaves as an unformatted output
110
  function [[ostream.unformatted]]. After constructing a `sentry` object,
111
- calls `sb.emit()`. If that call returns `false`, calls
112
  `setstate(ios_base::badbit)`.
113
 
114
  [*Example 1*:
115
 
116
  A flush on a `basic_osyncstream` does not flush immediately:
@@ -149,11 +149,11 @@ on the underlying stream.
149
 
150
  ``` cpp
151
  streambuf_type* get_wrapped() const noexcept;
152
  ```
153
 
154
- *Returns:* `sb.get_wrapped()`.
155
 
156
  [*Example 3*:
157
 
158
  Obtaining the wrapped stream buffer with `get_wrapped()` allows wrapping
159
  it again with an `osyncstream`. For example,
 
6
  namespace std {
7
  template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
8
  class basic_osyncstream : public basic_ostream<charT, traits> {
9
  public:
10
  using char_type = charT;
11
+ using int_type = traits::int_type;
12
+ using pos_type = traits::pos_type;
13
+ using off_type = traits::off_type;
14
  using traits_type = traits;
15
 
16
  using allocator_type = Allocator;
17
  using streambuf_type = basic_streambuf<charT, traits>;
18
  using syncbuf_type = basic_syncbuf<charT, traits, Allocator>;
 
77
 
78
  ``` cpp
79
  basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
80
  ```
81
 
82
+ *Effects:* Initializes *sb* from `buf` and `allocator`. Initializes the
83
+ base class with `basic_ostream<charT, traits>(addressof(`*`sb`*`))`.
84
 
85
  [*Note 1*: The member functions of the provided stream buffer can be
86
  called from `emit()` while a lock is held, which might result in a
87
  deadlock if used incautiously. — *end note*]
88
 
 
90
 
91
  ``` cpp
92
  basic_osyncstream(basic_osyncstream&& other) noexcept;
93
  ```
94
 
95
+ *Effects:* Move constructs the base class and *sb* from the
96
  corresponding subobjects of `other`, and calls
97
+ `basic_ostream<charT, traits>::set_rdbuf(addressof(`*`sb`*`))`.
98
 
99
  *Ensures:* The value returned by `get_wrapped()` is the value returned
100
  by `other.get_wrapped()` prior to calling this constructor.
101
  `nullptr == other.get_wrapped()` is `true`.
102
 
 
106
  void emit();
107
  ```
108
 
109
  *Effects:* Behaves as an unformatted output
110
  function [[ostream.unformatted]]. After constructing a `sentry` object,
111
+ calls *`sb`*`.emit()`. If that call returns `false`, calls
112
  `setstate(ios_base::badbit)`.
113
 
114
  [*Example 1*:
115
 
116
  A flush on a `basic_osyncstream` does not flush immediately:
 
149
 
150
  ``` cpp
151
  streambuf_type* get_wrapped() const noexcept;
152
  ```
153
 
154
+ *Returns:* *`sb`*`.get_wrapped()`.
155
 
156
  [*Example 3*:
157
 
158
  Obtaining the wrapped stream buffer with `get_wrapped()` allows wrapping
159
  it again with an `osyncstream`. For example,