io/BufferedReader: add method ReadFullT()
This commit is contained in:
parent
fb961e89da
commit
a375f0f160
@ -66,6 +66,18 @@ public:
|
|||||||
*/
|
*/
|
||||||
void ReadFull(std::span<std::byte> dest);
|
void ReadFull(std::span<std::byte> dest);
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
void ReadFullT(T &dest) {
|
||||||
|
ReadFull({&dest, sizeof(dest)});
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
T ReadFullT() {
|
||||||
|
T dest;
|
||||||
|
ReadFullT<T>(dest);
|
||||||
|
return dest;
|
||||||
|
}
|
||||||
|
|
||||||
char *ReadLine();
|
char *ReadLine();
|
||||||
|
|
||||||
unsigned GetLineNumber() const noexcept {
|
unsigned GetLineNumber() const noexcept {
|
||||||
|
Loading…
Reference in New Issue
Block a user