Use delete instead of hiding copy constructors and assignments (#1820)

This commit is contained in:
Benoit Blanchon
2023-02-17 10:58:02 +01:00
parent 33a4773fbd
commit b2b995edb3
5 changed files with 9 additions and 15 deletions

View File

@ -11,6 +11,7 @@ class CustomReader {
public:
CustomReader(const char* input) : _stream(input) {}
CustomReader(const CustomReader&) = delete;
int read() {
return _stream.get();
@ -20,7 +21,4 @@ class CustomReader {
_stream.read(buffer, static_cast<std::streamsize>(length));
return static_cast<size_t>(_stream.gcount());
}
private:
CustomReader(const CustomReader&);
};