From Jason Turner

[conversions.buffer]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp1_ldfy_m/{from.md → to.md} +11 -5
tmp/tmp1_ldfy_m/{from.md → to.md} RENAMED
@@ -14,14 +14,19 @@ template<class Codecvt,
14
  class wbuffer_convert
15
  : public std::basic_streambuf<Elem, Tr> {
16
  public:
17
  typedef typename Codecvt::state_type state_type;
18
 
19
- wbuffer_convert(std::streambuf *bytebuf = 0,
20
  Codecvt* pcvt = new Codecvt,
21
  state_type state = state_type());
22
 
 
 
 
 
 
23
  std::streambuf* rdbuf() const;
24
  std::streambuf* rdbuf(std::streambuf* bytebuf);
25
 
26
  state_type state() const;
27
 
@@ -35,13 +40,12 @@ template<class Codecvt,
35
 
36
  The class template describes a stream buffer that controls the
37
  transmission of elements of type `Elem`, whose character traits are
38
  described by the class `Tr`, to and from a byte stream buffer of type
39
  `std::streambuf`. Conversion between a sequence of `Elem` values and
40
- multibyte sequences is performed by an object of class
41
- `Codecvt<Elem, char, std::mbstate_t>`, which shall meet the requirements
42
- of the standard code-conversion facet
43
  `std::codecvt<Elem, char, std::mbstate_t>`.
44
 
45
  An object of this class template stores:
46
 
47
  - `bufptr` — a pointer to its underlying byte stream buffer
@@ -74,14 +78,16 @@ typedef typename Codecvt::state_type state_type;
74
  ```
75
 
76
  The type shall be a synonym for `Codecvt::state_type`.
77
 
78
  ``` cpp
79
- wbuffer_convert(std::streambuf *bytebuf = 0,
80
  Codecvt* pcvt = new Codecvt, state_type state = state_type());
81
  ```
82
 
 
 
83
  *Effects:* The constructor constructs a stream buffer object,
84
  initializes `bufptr` to `bytebuf`, initializes `cvtptr` to `pcvt`, and
85
  initializes `cvtstate` to `state`.
86
 
87
  ``` cpp
 
14
  class wbuffer_convert
15
  : public std::basic_streambuf<Elem, Tr> {
16
  public:
17
  typedef typename Codecvt::state_type state_type;
18
 
19
+ explicit wbuffer_convert(std::streambuf* bytebuf = 0,
20
  Codecvt* pcvt = new Codecvt,
21
  state_type state = state_type());
22
 
23
+ ~wbuffer_convert();
24
+
25
+ wbuffer_convert(const wbuffer_convert&) = delete;
26
+ wbuffer_convert& operator=(const wbuffer_convert&) = delete;
27
+
28
  std::streambuf* rdbuf() const;
29
  std::streambuf* rdbuf(std::streambuf* bytebuf);
30
 
31
  state_type state() const;
32
 
 
40
 
41
  The class template describes a stream buffer that controls the
42
  transmission of elements of type `Elem`, whose character traits are
43
  described by the class `Tr`, to and from a byte stream buffer of type
44
  `std::streambuf`. Conversion between a sequence of `Elem` values and
45
+ multibyte sequences is performed by an object of class `Codecvt`, which
46
+ shall meet the requirements of the standard code-conversion facet
 
47
  `std::codecvt<Elem, char, std::mbstate_t>`.
48
 
49
  An object of this class template stores:
50
 
51
  - `bufptr` — a pointer to its underlying byte stream buffer
 
78
  ```
79
 
80
  The type shall be a synonym for `Codecvt::state_type`.
81
 
82
  ``` cpp
83
+ explicit wbuffer_convert(std::streambuf* bytebuf = 0,
84
  Codecvt* pcvt = new Codecvt, state_type state = state_type());
85
  ```
86
 
87
+ *Requires:* `pcvt != nullptr`.
88
+
89
  *Effects:* The constructor constructs a stream buffer object,
90
  initializes `bufptr` to `bytebuf`, initializes `cvtptr` to `pcvt`, and
91
  initializes `cvtstate` to `state`.
92
 
93
  ``` cpp