From Jason Turner

[ostream.iterator]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpk57jfdr1/{from.md → to.md} +19 -13
tmp/tmpk57jfdr1/{from.md → to.md} RENAMED
@@ -17,25 +17,30 @@ while (first != last)
17
  is defined as:
18
 
19
  ``` cpp
20
  namespace std {
21
  template <class T, class charT = char, class traits = char_traits<charT>>
22
- class ostream_iterator:
23
- public iterator<output_iterator_tag, void, void, void, void> {
24
  public:
25
- typedef charT char_type;
26
- typedef traits traits_type;
27
- typedef basic_ostream<charT,traits> ostream_type;
 
 
 
 
 
 
28
  ostream_iterator(ostream_type& s);
29
  ostream_iterator(ostream_type& s, const charT* delimiter);
30
- ostream_iterator(const ostream_iterator<T,charT,traits>& x);
31
  ~ostream_iterator();
32
- ostream_iterator<T,charT,traits>& operator=(const T& value);
33
 
34
- ostream_iterator<T,charT,traits>& operator*();
35
- ostream_iterator<T,charT,traits>& operator++();
36
- ostream_iterator<T,charT,traits>& operator++(int);
37
  private:
38
  basic_ostream<charT,traits>* out_stream; // exposition only
39
  const charT* delim; // exposition only
40
  };
41
  }
@@ -45,17 +50,18 @@ namespace std {
45
 
46
  ``` cpp
47
  ostream_iterator(ostream_type& s);
48
  ```
49
 
50
- *Effects:* Initializes *out_stream* with `&s` and *delim* with null.
 
51
 
52
  ``` cpp
53
  ostream_iterator(ostream_type& s, const charT* delimiter);
54
  ```
55
 
56
- *Effects:* Initializes *out_stream* with `&s` and *delim* with
57
  `delimiter`.
58
 
59
  ``` cpp
60
  ostream_iterator(const ostream_iterator& x);
61
  ```
@@ -72,11 +78,11 @@ ostream_iterator(const ostream_iterator& x);
72
 
73
  ``` cpp
74
  ostream_iterator& operator=(const T& value);
75
  ```
76
 
77
- *Effects:*
78
 
79
  ``` cpp
80
  *out_stream << value;
81
  if (delim != 0)
82
  *out_stream << delim;
 
17
  is defined as:
18
 
19
  ``` cpp
20
  namespace std {
21
  template <class T, class charT = char, class traits = char_traits<charT>>
22
+ class ostream_iterator {
 
23
  public:
24
+ using iterator_category = output_iterator_tag;
25
+ using value_type = void;
26
+ using difference_type = void;
27
+ using pointer = void;
28
+ using reference = void;
29
+ using char_type = charT;
30
+ using traits_type = traits;
31
+ using ostream_type = basic_ostream<charT,traits>;
32
+
33
  ostream_iterator(ostream_type& s);
34
  ostream_iterator(ostream_type& s, const charT* delimiter);
35
+ ostream_iterator(const ostream_iterator& x);
36
  ~ostream_iterator();
37
+ ostream_iterator& operator=(const T& value);
38
 
39
+ ostream_iterator& operator*();
40
+ ostream_iterator& operator++();
41
+ ostream_iterator& operator++(int);
42
  private:
43
  basic_ostream<charT,traits>* out_stream; // exposition only
44
  const charT* delim; // exposition only
45
  };
46
  }
 
50
 
51
  ``` cpp
52
  ostream_iterator(ostream_type& s);
53
  ```
54
 
55
+ *Effects:* Initializes `out_stream` with `addressof(s)` and `delim` with
56
+ null.
57
 
58
  ``` cpp
59
  ostream_iterator(ostream_type& s, const charT* delimiter);
60
  ```
61
 
62
+ *Effects:* Initializes `out_stream` with `addressof(s)` and `delim` with
63
  `delimiter`.
64
 
65
  ``` cpp
66
  ostream_iterator(const ostream_iterator& x);
67
  ```
 
78
 
79
  ``` cpp
80
  ostream_iterator& operator=(const T& value);
81
  ```
82
 
83
+ *Effects:* As if by:
84
 
85
  ``` cpp
86
  *out_stream << value;
87
  if (delim != 0)
88
  *out_stream << delim;