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

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3832: ptr_list const items
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-06-10 22:10:25


#3832: ptr_list const items
----------------------------------+-----------------------------------------
  Reporter: matcatprg@… | Owner: nesotto
      Type: Bugs | Status: closed
 Milestone: Boost 1.43.0 | Component: ptr_container
   Version: Boost 1.41.0 | Severity: Problem
Resolution: fixed | Keywords: ptr_list const
----------------------------------+-----------------------------------------

Comment (by matcatprg@…):

 I tested ptr_unordered_map<const char, const BASE*>. The test program
 compiled and ran both with and with out the consts. It also worked when
 the mapped type wasn't a pointer (i.e: const BASE).

 For completeness, I went ahead and retested ptr_list as well. The full
 results are as follows:

 {{{
 container type | trunk (72523) | 1_46_1
 ------------------- | --------------- |
 ----------------------------------------
 ptr_list | works | fails as before (fix not pushed to
 releases yet)
 ptr_unordered_map | works | works
 }}}

 The only problems I had were with grokking how to use the container (my
 inexperience + doc vagueness) and trying to get insert() to work.
 Regarding the docs, more elaboration would be nice (e.g: what can be a
 pointer: the mapped type).

 Regarding insert(), I couldn't tell exactly what was wrong, but it didn't
 have anything to do with const. I ended up using the "[]" operator to do
 insertion (which isn't mentioned in the doc but works and appears to be
 part of the intended behaviour based on ptr_map_adapter.hpp)

 Let me know if you want more information or help.

 Matthew

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3832#comment:8>
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:06 UTC