Date
2009-05-15.00:00:00
Message id
2046

Content

Additional notes (May, 2009):

Consider the following example:

    struct Base {
      private:
        ~Base() = default;
    };

    struct Derived: Base {
    };

The implicitly-declared destructor of Derived is defined as deleted because Base::~Base() is inaccessible, but it fulfills the requirements for being trivial. Presumably the Base destructor should be non-trivial, either by directly specifying that it is non-trivial or by specifying that it is user-provided. An alternative would be to make it ill-formed to attempt to declare a defaulted non-public special member function.

Any changes to the definition of triviality should be checked against Clause 11 [class] paragraph 6 for any changes needed there to accommodate the new definitions.