Hi,
Anders Backman wrote:
Hi!
Compiling the following class in VisualStudio with the highest varning
level /W4 results in the warning:
OpenSceneGraph\include\OpenThreads/ReadWriteMutex(94) : warning C4512:
'OpenThreads::ScopedReadLock' : assignment operator could not be generated
class ScopedReadLock
{
public:
ScopedReadLock(ReadWriteMutex& mutex):_mutex(mutex) {
_mutex.readLock(); }
~ScopedReadLock() { _mutex.readUnlock(); }
protected:
ReadWriteMutex& _mutex;
};
It would be nice if this warning could be avoided.
Unfortunately in this case there is basically only one way of doing that:
As another option, can one not write one's own assignment operator?
jp
#ifdef _WIN32
// Disable warning about assignment operator could not be generated
due to reference members.
#pragma warning( disable: 4512 )
#endif
/Anders
--
------------------------------------------------------------------------
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org