tmp/tmpxwxt0lfv/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### General <a id="ispanstream.general">[[ispanstream.general]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std {
|
| 5 |
+
template<class charT, class traits = char_traits<charT>>
|
| 6 |
+
class basic_ispanstream
|
| 7 |
+
: public basic_istream<charT, traits> {
|
| 8 |
+
public:
|
| 9 |
+
using char_type = charT;
|
| 10 |
+
using int_type = typename traits::int_type;
|
| 11 |
+
using pos_type = typename traits::pos_type;
|
| 12 |
+
using off_type = typename traits::off_type;
|
| 13 |
+
using traits_type = traits;
|
| 14 |
+
|
| 15 |
+
// [ispanstream.cons], constructors
|
| 16 |
+
explicit basic_ispanstream(std::span<charT> s,
|
| 17 |
+
ios_base::openmode which = ios_base::in);
|
| 18 |
+
basic_ispanstream(const basic_ispanstream&) = delete;
|
| 19 |
+
basic_ispanstream(basic_ispanstream&& rhs);
|
| 20 |
+
template<class ROS> explicit basic_ispanstream(ROS&& s);
|
| 21 |
+
|
| 22 |
+
basic_ispanstream& operator=(const basic_ispanstream&) = delete;
|
| 23 |
+
basic_ispanstream& operator=(basic_ispanstream&& rhs);
|
| 24 |
+
|
| 25 |
+
// [ispanstream.swap], swap
|
| 26 |
+
void swap(basic_ispanstream& rhs);
|
| 27 |
+
|
| 28 |
+
// [ispanstream.members], member functions
|
| 29 |
+
basic_spanbuf<charT, traits>* rdbuf() const noexcept;
|
| 30 |
+
|
| 31 |
+
std::span<const charT> span() const noexcept;
|
| 32 |
+
void span(std::span<charT> s) noexcept;
|
| 33 |
+
template<class ROS> void span(ROS&& s) noexcept;
|
| 34 |
+
|
| 35 |
+
private:
|
| 36 |
+
basic_spanbuf<charT, traits> sb; // exposition only
|
| 37 |
+
};
|
| 38 |
+
}
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
[*Note 1*: Constructing an `ispanstream` from a *string-literal*
|
| 42 |
+
includes the termination character `'\0'` in the underlying
|
| 43 |
+
`spanbuf`. — *end note*]
|
| 44 |
+
|