|
Boost : |
From: bwlee (bwlee.sky_at_[hidden])
Date: 2006-03-29 01:06:27
I defined a class inherited from noncoyable and singleton, but when
compiled by vc8.0(VC++ express 2005), it report a error like this:
template<typename T>
class thread_pool : boost::noncopyable, public boost::singleton
{
//...
};
center\code\project.net\include\thread_pool.hpp(227) : error C2248:
'boost::noncopyable_::noncopyable::operator =' : cannot access private
member declared in class 'boost::noncopyable_::noncopyable'
c:\boost\include\boost-1_33_1\boost\noncopyable.hpp(28) : see
declaration of 'boost::noncopyable_::noncopyable::operator ='
c:\boost\include\boost-1_33_1\boost\noncopyable.hpp(22) : see
declaration of 'boost::noncopyable_::noncopyable'
This diagnostic occurred in the compiler generated function
'core::thread_pool<worker> &core::thread_pool<worker>::operator
=(robert::core::thread_pool<worker> &)'
with
[
worker=core::worker_thread
]
I wonder why it need to generate function overriding operator '='.
Is there any simple solution?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk