Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 8
    There are some other uses of the =delete syntax. For example you can use it to explicitly disallow some kind of implicit conversions that might take place with the call. For this you just delete the overloaded functions. Have a look a the Wikipedia page on C++0x for more info. Commented Apr 1, 2011 at 13:59
  • I will do that as soon as I find some. Guess it it time to catch up with c++0X Commented Apr 1, 2011 at 15:08
  • 1
    Yeah, C++0x rocks. I can't wait for GCC 4.5+ to be more common, so I can start using lambdas. Commented Apr 1, 2011 at 15:21
  • 16
    The description for = delete is not entirely correct. = delete can be used for any function, in which case it is explicitly marked as deleted and any use results in a compiler error. For special member functions, this also means in particular that they then aren't generated for you by the compiler, but that is only a result of being deleted, and not what = delete truly is. Commented Oct 4, 2016 at 9:11
  • @MicroVirus I suppose your final point is really a result of the special functions having been declared by the programmer - declaring them as deleted is just an example of this. Commented Jan 5, 2023 at 10:17