drop(T*): use =delete instead of static_assert

This commit is contained in:
Mm2PL 2024-09-02 20:31:33 +02:00
parent b83f49ff63
commit 6cf8d049f1
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9

View file

@ -15,9 +15,6 @@ inline void drop(T &var)
* Helps you avoid accidentally dropping a pointer not the object behind it.
*/
template <typename T>
inline void drop(T * /*var*/)
{
static_assert(false, "Use delete on a pointer instead of drop().");
}
inline void drop(T * /*var*/) = delete;
} // namespace chatterino