21 Mar
2012
21 Mar
'12
4:14 a.m.
On 3/20/2012 3:21 AM, Robert Jones wrote:
That kind of defeats the purpose, doesn't it? I have to declare a dummy copy constructor to get the class to compile.
If I haven't missed the point of your post I think that's exactly what it's supposed to do. The mention of 'noncopyable' in the error message is the hint.
I interpreted the error, which cited the class itself and not anything in my code that uses the class, to mean that the auto-generation was not suppressed at all and in fact prevented it from being successful rather than silently being not generated. It turns out that something in my code did want the assignment, so the class "did its job" but was totally unhelpful in telling me where in the code this was.