delete undesired default members instead of making them inaccessible

This commit is contained in:
Axel Kohlmeyer
2022-06-01 02:30:25 -04:00
parent 5abb6c76af
commit 9da3dd796a
3 changed files with 17 additions and 18 deletions

View File

@ -22,6 +22,9 @@ class YamlWriter {
public:
YamlWriter(const char *outfile);
virtual ~YamlWriter();
YamlWriter() = delete;
YamlWriter(const YamlWriter &) = delete;
const YamlWriter & operator=(const YamlWriter &) = delete;
// emitters
void emit(const std::string &key, const double value);
@ -34,10 +37,6 @@ private:
FILE *fp;
yaml_emitter_t emitter;
yaml_event_t event;
private:
YamlWriter(){};
YamlWriter(const YamlWriter &){};
};
#endif