|
Boost Users : |
From: Dan Thill (dgt_at_[hidden])
Date: 2007-07-19 15:44:39
Seeking ptr_container guru,
My first usage of ptr_container, and I fear I'm missing something
obvious. I keep getting the following compile error:
--------------------------------------------
Z:\Tools\boost\boost_1_34_0\boost/ptr_container/detail/associative_ptr_container.hpp(202)
: error C2248: 'boost::ptr_container_detail::reversible_ptr_container<Config,CloneAllocator>::reversible_ptr_container'
: cannot access private member declared in class
'boost::ptr_container_detail::reversible_ptr_container<Config,CloneAllocator>'
with
[
Config=boost::ptr_container_detail::set_config<Abstract_Record,std::set<void
*,boost::void_ptr_indirect_fun<std::less<Abstract_Record>,Abstract_Record>,std::allocator<void
*>>>,
CloneAllocator=boost::heap_clone_allocator
]
Z:\Tools\boost\boost_1_34_0\boost/ptr_container/detail/reversible_ptr_container.hpp(286)
: see declaration of
'boost::ptr_container_detail::reversible_ptr_container<Config,CloneAllocator>::reversible_ptr_container'
with
[
Config=boost::ptr_container_detail::set_config<Abstract_Record,std::set<void
*,boost::void_ptr_indirect_fun<std::less<Abstract_Record>,Abstract_Record>,std::allocator<void
*>>>,
CloneAllocator=boost::heap_clone_allocator
]
This diagnostic occurred in the compiler generated function
'boost::ptr_container_detail::associative_ptr_container<Config,CloneAllocator>::associative_ptr_container(const
boost::ptr_container_detail::associative_ptr_container<Config,CloneAllocator>
&)'
with
[
Config=boost::ptr_container_detail::set_config<Abstract_Record,std::set<void
*,boost::void_ptr_indirect_fun<std::less<Abstract_Record>,Abstract_Record>,std::allocator<void
*>>>,
CloneAllocator=boost::heap_clone_allocator
]
--------------------------------------------
My container is declared thusly:
boost::ptr_set<Abstract_Record>
And the relevant parts of
--------------------------------------------
class Abstract_Record {
public:
Abstract_Record();
Abstract_Record* clone();
virtual bool operator<(const Abstract_Record&);
private:
Abstract_Record(const Abstract_Record&);
};
--------------------------------------------
I'm having trouble deciphering the error message. I declared a
new_clone() function as described in the docs. I also tried writing
my own CloneAllocator. Neither have any effect. I would be very
grateful for some insight, or even a nudge with a cluebat.
-Dan
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net