id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 3249,ptr_list of const items,matcatprg@…,Thorsten Ottosen,"My code will not compile when I have a ptr_list of const abstract classes (i.e: boost::ptr_list). When I remove the const keyword, the code compiles and works fine. I'm using gcc 4.3 on Ubuntu GNU/Linux. Does the list need to be able to manipulate its items and therefore they can't be const? Or is it some bug? I noticed this line in the output: invalid conversion from ‘const void*’ to ‘void*’ leading me to believe that it can't take consts. If it indeed can't take consts, you should mention it in the documentation or faq for ptr_container. Thanks, Matthew A. Todd Here is the output from the compiler: /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp: In member function ‘void boost::ptr_sequence_adapter::push_back(typename boost::ptr_container_detail::reversible_ptr_container, CloneAllocator>::value_type) [with T = const BASE, VoidPtrSeq = std::list >, CloneAllocator = boost::heap_clone_allocator]’: main.cpp:42: instantiated from here /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp:183: error: invalid conversion from ‘const void*’ to ‘void*’ /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp:183: error: initializing argument 1 of ‘void std::list<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = void*, _Alloc = std::allocator]’ ",Bugs,closed,Boost 1.40.0,ptr_container,Boost 1.35.0,Problem,fixed,ptr_list const,