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

This commit is contained in:
Benoit Blanchon committed 2023-02-17 10:59:57 +01:00
1 parent 33a4773fbd
commit b2b995edb3
5 files changed
+9 -15

No files matched your search

+1 -3
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&);
};