mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
drop(T*): use =delete instead of static_assert
This commit is contained in:
parent
b83f49ff63
commit
6cf8d049f1
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue