Hello
I'm trying to use ptr_vector but I'm having headaches because I have no
idea why I'm getting this error:
error C2248:
'boost::ptr_container_detail::reversible_ptr_container::operator
=' : cannot access private member declared in class
'boost::ptr_container_detail::reversible_ptr_container'
with
[
Config=boost::ptr_container_detail::sequence_config>>,
CloneAllocator=boost::heap_clone_allocator
]
C:\Program
Files\boost\boost_1_34_0\boost/ptr_container/detail/reversible_ptr_container.hpp(287)
: see declaration of
'boost::ptr_container_detail::reversible_ptr_container::operator
='
with
[
Config=boost::ptr_container_detail::sequence_config>>,
CloneAllocator=boost::heap_clone_allocator
]
This diagnostic occurred in the compiler generated function
'boost::ptr_sequence_adapter
&boost::ptr_sequence_adapter::operator
=(const boost::ptr_sequence_adapter &)'
with
[
T=boost::asio::dns::base_nameserver_resource,
VoidPtrSeq=std::vector>,
CloneAllocator=boost::heap_clone_allocator
]
My code (simplified):
class base1 {
public:
void somefunc() {
};
};
class main : public base1 {
public:
virtual void somefunc() {
}
};
class derived : public main {
public:
virtual void somefunc() {
}
};
boost::ptr_vector<main> m_vector;
Any Idea what am I doing wrong?
I tried to add do_clone functions/members without success.
Any help is highly appreciated
Regards
A