[Boost-bugs] [Boost C++ Libraries] #3832: ptr_list const items

Subject: [Boost-bugs] [Boost C++ Libraries] #3832: ptr_list const items
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-10 20:07:43


#3832: ptr_list const items
---------------------------------+------------------------------------------
 Reporter: matcatprg@… | Owner: nesotto
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: ptr_container
  Version: Boost 1.41.0 | Severity: Problem
 Keywords: ptr_list const |
---------------------------------+------------------------------------------
 Similar to ticket #3249 (https://svn.boost.org/trac/boost/ticket/3249).
 ptr_list has problems with const items, but works fine with non-const
 items. Both push_back() and push_front() cause errors. I'm using gcc/g++
 4.4.1 on Ubuntu GNU/Linux.

 Here is my compilation output (also included as an attachment for
 clarity):

 In file included from /usr/include/boost/ptr_container/ptr_list.hpp:19,
                  from main.cpp:1:
 /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp: In member
 function ‘void boost::ptr_sequence_adapter<T, VoidPtrSeq,
 CloneAllocator>::push_back(typename
 boost::ptr_container_detail::reversible_ptr_container<boost::ptr_container_detail::sequence_config<T,
 VoidPtrSeq>, CloneAllocator>::value_type) [with T = const BASE, VoidPtrSeq
 = std::list<void*, std::allocator<void*> >, CloneAllocator =
 boost::heap_clone_allocator]’:
 main.cpp:41: instantiated from here
 /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp:249: error:
 invalid conversion from ‘const void*’ to ‘void*’
 /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp:249: error:
 initializing argument 1 of ‘void std::list<_Tp, _Alloc>::push_back(const
 _Tp&) [with _Tp = void*, _Alloc = std::allocator<void*>]’

 Again, the interesting line is: invalid conversion from ‘const void*’ to
 â€˜void*’

 The attached file source code, is the same as from the previous ticket.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3832>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC