First thought: are you linking to boost libraries
complied by VS2003, not the same ones you were using for 2005?
From:
boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On
Behalf Of Bernard Maassen
Sent: 20 February 2008 13:37
To: boost-users@lists.boost.org
Subject: [Boost-users] scope_lock
problem
Hi all
i'm porting a program written in visual studio 2005 to vs 2003, and came to a
problem i can't
fix.
The idea is to have a lock a mutex while a object excists. The code is:
template <class B>
class BaseReadLockProxy
{
private:
const B& base;
typename B::MutexType::scoped_lock baseScoped_lock;
public:
BaseReadLockProxy(const B& b):
base(b),
baseScoped_lock(
B::MutexType::scoped_lock(b.baseMutex))
{
}
typename const B::ContainerType& getItems()
{
return base.getItems();
}
~BaseReadLockProxy()
{
}
};
Where B::MutexType: typedef boost::mutex MutexType;
When compiling this gives:
e:\stage2\2apl\2aplcore\BaseScopeLockedProxy.h(39) : error C2558: class
'boost::detail::thread::scoped_lock<Mutex>' : no copy constructor
available or copy constructor is declared 'explicit'
with
[
Mutex=boost::mutex
]
e:\stage2\2apl\2aplcore\BaseScopeLockedProxy.h(36) : while compiling
class-template member function
'doubleapl::BaseReadLockProxy<B>::BaseReadLockProxy(const B &)'
with
[
B=doubleapl::PRRuleBase
]
RuleOption.cpp(112) : see reference
to class template instantiation 'doubleapl::BaseReadLockProxy<B>' being
compiled
with
[
B=doubleapl::PRRuleBase
]
I know it should work, because it compiles/runs when using visual studio 2005.
Does anyone have an idea what could cause this problem?
All ideas are welcome, cause i'm totally stuck
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________