From Jason Turner

[istream.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpeboj65zr/{from.md → to.md} +111 -0
tmp/tmpeboj65zr/{from.md → to.md} RENAMED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##### General <a id="istream.general">[[istream.general]]</a>
2
+
3
+ When a function is specified with a type placeholder of
4
+ `extended-floating-point-type`, the implementation provides overloads
5
+ for all cv-unqualified extended floating-point types
6
+ [[basic.fundamental]] in lieu of `extended-floating-{point-type}`.
7
+
8
+ ``` cpp
9
+ namespace std {
10
+ template<class charT, class traits = char_traits<charT>>
11
+ class basic_istream : virtual public basic_ios<charT, traits> {
12
+ public:
13
+ // types (inherited from basic_ios[ios])
14
+ using char_type = charT;
15
+ using int_type = typename traits::int_type;
16
+ using pos_type = typename traits::pos_type;
17
+ using off_type = typename traits::off_type;
18
+ using traits_type = traits;
19
+
20
+ // [istream.cons], constructor/destructor
21
+ explicit basic_istream(basic_streambuf<charT, traits>* sb);
22
+ virtual ~basic_istream();
23
+
24
+ // [istream.sentry], prefix/suffix
25
+ class sentry;
26
+
27
+ // [istream.formatted], formatted input
28
+ basic_istream& operator>>(basic_istream& (*pf)(basic_istream&));
29
+ basic_istream& operator>>(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
30
+ basic_istream& operator>>(ios_base& (*pf)(ios_base&));
31
+
32
+ basic_istream& operator>>(bool& n);
33
+ basic_istream& operator>>(short& n);
34
+ basic_istream& operator>>(unsigned short& n);
35
+ basic_istream& operator>>(int& n);
36
+ basic_istream& operator>>(unsigned int& n);
37
+ basic_istream& operator>>(long& n);
38
+ basic_istream& operator>>(unsigned long& n);
39
+ basic_istream& operator>>(long long& n);
40
+ basic_istream& operator>>(unsigned long long& n);
41
+ basic_istream& operator>>(float& f);
42
+ basic_istream& operator>>(double& f);
43
+ basic_istream& operator>>(long double& f);
44
+ basic_istream& operator>>(extended-floating-point-type& f);
45
+
46
+ basic_istream& operator>>(void*& p);
47
+ basic_istream& operator>>(basic_streambuf<char_type, traits>* sb);
48
+
49
+ // [istream.unformatted], unformatted input
50
+ streamsize gcount() const;
51
+ int_type get();
52
+ basic_istream& get(char_type& c);
53
+ basic_istream& get(char_type* s, streamsize n);
54
+ basic_istream& get(char_type* s, streamsize n, char_type delim);
55
+ basic_istream& get(basic_streambuf<char_type, traits>& sb);
56
+ basic_istream& get(basic_streambuf<char_type, traits>& sb, char_type delim);
57
+
58
+ basic_istream& getline(char_type* s, streamsize n);
59
+ basic_istream& getline(char_type* s, streamsize n, char_type delim);
60
+
61
+ basic_istream& ignore(streamsize n = 1, int_type delim = traits::eof());
62
+ int_type peek();
63
+ basic_istream& read (char_type* s, streamsize n);
64
+ streamsize readsome(char_type* s, streamsize n);
65
+
66
+ basic_istream& putback(char_type c);
67
+ basic_istream& unget();
68
+ int sync();
69
+
70
+ pos_type tellg();
71
+ basic_istream& seekg(pos_type);
72
+ basic_istream& seekg(off_type, ios_base::seekdir);
73
+
74
+ protected:
75
+ // [istream.cons], copy/move constructor
76
+ basic_istream(const basic_istream&) = delete;
77
+ basic_istream(basic_istream&& rhs);
78
+
79
+ // [istream.assign], assignment and swap
80
+ basic_istream& operator=(const basic_istream&) = delete;
81
+ basic_istream& operator=(basic_istream&& rhs);
82
+ void swap(basic_istream& rhs);
83
+ };
84
+
85
+ // [istream.extractors], character extraction templates
86
+ template<class charT, class traits>
87
+ basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>&, charT&);
88
+ template<class traits>
89
+ basic_istream<char, traits>& operator>>(basic_istream<char, traits>&, unsigned char&);
90
+ template<class traits>
91
+ basic_istream<char, traits>& operator>>(basic_istream<char, traits>&, signed char&);
92
+
93
+ template<class charT, class traits, size_t N>
94
+ basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>&, charT(&)[N]);
95
+ template<class traits, size_t N>
96
+ basic_istream<char, traits>& operator>>(basic_istream<char, traits>&, unsigned char(&)[N]);
97
+ template<class traits, size_t N>
98
+ basic_istream<char, traits>& operator>>(basic_istream<char, traits>&, signed char(&)[N]);
99
+ }
100
+ ```
101
+
102
+ The class template `basic_istream` defines a number of member function
103
+ signatures that assist in reading and interpreting input from sequences
104
+ controlled by a stream buffer.
105
+
106
+ Two groups of member function signatures share common properties: the
107
+ *formatted input functions* (or *extractors*) and the *unformatted input
108
+ functions.* Both groups of input functions are described as if they
109
+ obtain (or *extract*) input *characters* by calling `rdbuf()->sbumpc()`
110
+ or `rdbuf()->sgetc()`. They may use other public members of `istream`.
111
+