C++ Logo

std-proposals

Advanced search

Re: [std-proposals] [[packed]] std::unaligned

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Tue, 12 Dec 2023 13:54:34 +0100
The task of distinguishing the properties of template parameters would also go into the domain of partial class template specialization. Class template specialization is the tool to change classes depending on the template parameter. You are asking for a not-so-clean solution, as the triviality depends on the declaration and not the definition of the destructor, which probably is just a bit less problematic for templates. Nevertheless it would be nicer to handle the conditional outside of the destructor function body. -----Ursprüngliche Nachricht----- Von:Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Di 12.12.2023 13:24 And then add wording to the standard something like: "An implementation of a destructor shall be considered trivial if, after expanding an 'if constexpr', the body of the destructor is empty" And so then an 'aligned<T>' would be trivially destructible if a T is trivially destructible.

Received on 2023-12-12 12:54:36