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.
|
* Helps you avoid accidentally dropping a pointer not the object behind it.
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void drop(T * /*var*/)
|
inline void drop(T * /*var*/) = delete;
|
||||||
{
|
|
||||||
static_assert(false, "Use delete on a pointer instead of drop().");
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
Loading…
Reference in a new issue