Archived
This forum has been archived. Please start a new discussion on GitHub.
Private Thread assignment
in Bug Reports
Trivial (usage) bug in IceUtil/Thread.h... Copy ctor and assignment should be private, but are currently public :-
So the following compiles but raises linker errors :-
class ICE_UTIL_API Thread : virtual public IceUtil::Shared
{
public:
/// ...
Thread(const Thread&); // Copying is forbidden
void operator=(const Thread&); // Assignment is forbidden
So the following compiles but raises linker errors :-
#include <Ice/Ice.h>
class MyThread : public IceUtil::Thread {
virtual void run() { }
};
int main(int argc, char *argv[]) {
MyThread t1, t2;
t1 = t2; // should raise compile error
MyThread t3(t2); // should raise compile error
return 0;
}
0
Comments
-
Woops. That's not supposed to happen
Thanks for the bug report. 0