Here\'s a minimum code example that illustrates the problem:
#include
class Thing
{
// Non-copyable
Thing(const Thing&);
Thing
C++ permits sufficiently-smart compilers to avoid copying temporary objects, the one violation of the as-if rule allowed by the standard. I'm not familiar with IBM's AIX C++ compiler, but it sounds like it thinks the show(3)
call requires a temporary Thing to be copied. In that case, C++ requires that you have an accessible copy constructor even though your compiler is smart enough to avoid using it.
But why does show(3)
require a copy in the first place? That I can't figure out. With luck, litb will be along in a bit.