diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-04-16 01:44:07 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-04-16 17:39:14 +0200 |
commit | cdd0b4fb7d48b32686d56364cf170569bdb0149d (patch) | |
tree | b094c966b33575eb9f2e441d1705990f45539bec /README-maintainer | |
parent | 2a7d2b63c2a7284d1b1179eefbf64f5dd29aa510 (diff) | |
download | qpdf-cdd0b4fb7d48b32686d56364cf170569bdb0149d.tar.zst |
Use = default and = delete where possible in classes
Diffstat (limited to 'README-maintainer')
-rw-r--r-- | README-maintainer | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/README-maintainer b/README-maintainer index 52c10810..f4c54324 100644 --- a/README-maintainer +++ b/README-maintainer @@ -165,6 +165,18 @@ CODING RULES or QPDFDocumentHelper subclasses since there's no reason to use dynamic_cast with those. + IMPORTANT NOTE ABOUT QPDF_DLL_CLASS: On mingw, the vtable for a + class with some virtual methods and no pure virtual methods seems + often (always?) not to be generated if the destructor is inline or + declared with `= default`. Therefore, for any class that is intended + to be used as a base class and doesn't contain any pure virtual + methods, you must declare the destructor in the header without + `= default` and provide a non-inline implementation in the source + file. Add this comment to the implementation: + + // Must be explicit and not inline -- see QPDF_DLL_CLASS in + // README-maintainer + * Put private member variables in std::shared_ptr<Members> for all public classes. Remember to use QPDF_DLL on ~Members(). Exception: indirection through std::shared_ptr<Members> is expensive, so don't |