https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125569

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Why do you think this is not correct?
First of all, std::is_literal_type is deprecated in C++17 and removed in C++20.
The literal type definition e.g. in C++17 says
...
a possibly cv-qualified class type (Clause 12) that has all of the following
properties:
— it has a trivial destructor,
— it is either a closure type (8.1.5.1), an aggregate type (11.6.1), or has at
least one constexpr constructor or constructor template (possibly inherited
(10.3.3) from a base class) that is not a copy or move constructor,
— if it is a union, at least one of its non-static data members is of
non-volatile literal type, and
— if it is not a union, all of its non-static data members and base classes are
of non-volatile literal types.
Now, I believe NotLiteral has trivial destructor, because it is not
user-provided (as it is deleted on first declaration):
A destructor is trivial if it is not user-provided and if:
— the destructor is not virtual,
— all of the direct base classes of its class have trivial destructors, and
— for all of the non-static data members of its class that are of class type
(or array thereof), each such class has a trivial destructor.
And aggregate type definition doesn't depend on the status of destructors at
all.

Reply via email to