diff options
author | dobrokot <dobrokot@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
commit | 8d57b69dee81198a59c39e64704f7dc9f04b4fbf (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/ptr.h | |
parent | 25d83bf841d8b3ce3886525078f1964ac3c293c5 (diff) | |
download | ydb-8d57b69dee81198a59c39e64704f7dc9f04b4fbf.tar.gz |
Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/ptr.h')
-rw-r--r-- | util/generic/ptr.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/generic/ptr.h b/util/generic/ptr.h index 2af6603934..19db0e3ec5 100644 --- a/util/generic/ptr.h +++ b/util/generic/ptr.h @@ -17,13 +17,13 @@ using TGuardConversion = typename std::enable_if_t<std::is_convertible<U*, T*>:: template <class T> inline void AssertTypeComplete() { - // If compiler triggers this error from destructor of your class with - // smart pointer, then may be you should move the destructor definition - // to the .cpp file, where type T have full definition. - // - // 'delete' called on pointer to incomplete type is - // undefined behavior (missing destructor call/corrupted memory manager). - // 'sizeof' is used to trigger compile-time error. + // If compiler triggers this error from destructor of your class with + // smart pointer, then may be you should move the destructor definition + // to the .cpp file, where type T have full definition. + // + // 'delete' called on pointer to incomplete type is + // undefined behavior (missing destructor call/corrupted memory manager). + // 'sizeof' is used to trigger compile-time error. static_assert(sizeof(T) != 0, "Type must be complete"); } |