QTypeInfo: add some code comments regarding a redundant check
Change-Id: Ic92f44c8df63bd71f313b672125481d710dc8c66 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
4565f97a5c
commit
3ac259f4cc
|
|
@ -23,6 +23,13 @@ class QDebug;
|
|||
|
||||
namespace QtPrivate {
|
||||
|
||||
// A trivially copyable class must also have a trivial, non-deleted
|
||||
// destructor [class.prop/1.3], CWG1734. Some implementations don't
|
||||
// check for a trivial destructor, because of backwards compatibility
|
||||
// with C++98's definition of trivial copyability.
|
||||
// Since trivial copiability has implications for the ABI, implementations
|
||||
// can't "just fix" their traits. So, although formally redundant, we
|
||||
// explicitly check for trivial destruction here.
|
||||
template <typename T>
|
||||
inline constexpr bool qIsRelocatable = std::is_trivially_copyable_v<T> && std::is_trivially_destructible_v<T>;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue