Can't pass reference to non-copyable object

Nigel Rantor wiggly@wiggly.org
Fri Oct 18 11:42:00 GMT 2002


Hi there,

This is crossed to g.g.help since g.g.bug looks dead.

I have a class lib with a class that has private copy constructors so 
you can't copy it implicitly. The library also has objects that take 
references to such classes. On gcc version 2.95.3 20010315 (release) 
this works fine, on  gcc version 2.96 20000731 (Red Hat Linux 7.1 
2.96-98) it fails complaining that the copy contructor is private.

Is this a known bug? (am I being stupid and it isn't a bug in 2.96?) (is 
it a bug in RH's build?)

Oh, it shouldn't matter but this is with the 
boost::recursive_mutex/boost::recursive_mutex::scoped_lock pair of classes.

Cheers,

   Nige



More information about the Gcc-bugs mailing list