Timeline for Meaning of `= delete` after function declaration
Current License: CC BY-SA 2.5
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 1, 2022 at 15:58 | comment | added | A Fog | = delete also works with non-member functions. This is useful for preventing implicit type conversions. | |
| Apr 1, 2011 at 14:38 | comment | added | UncleBens | You can delete any function. E.g void foo(int); template <class T> void foo(T) = delete; stops all implicit conversions. Only arguments of int type are accepted, all others will try to instantiate a "deleted" function. | |
| Apr 1, 2011 at 13:22 | history | answered | Tayyab | CC BY-SA 2.5 |