xcode - "attempt to use a deleted function" - what does that mean?

Roey Lehman picture Roey Lehman · Apr 9, 2012 · Viewed 13.1k times · Source

I am writing a C++ library in Xcode 4.2

One of my classes won't compile with this error : "attempt to use a deleted function".

There is no specific indication what function it's talking about. I don't want to post the class code here, but does anybody have any idea what this error means? It's nowhere to be found on Google... :(

thanks a bunch

Roey

Answer

Carlos Molinero picture Carlos Molinero · Sep 3, 2014

I had a similar message with threads (C++11). It turned out that I was passing the wrong number of parameters to the function called by the thread so the thread did not find any function suitable and gave that message.