[Boost-bugs] [Boost C++ Libraries] #5165: Error in documentaiton "Using smart pointers with Boost.Intrusive containers"

Subject: [Boost-bugs] [Boost C++ Libraries] #5165: Error in documentaiton "Using smart pointers with Boost.Intrusive containers"
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-06 21:59:33


#5165: Error in documentaiton "Using smart pointers with Boost.Intrusive
containers"
---------------------------------------------+------------------------------
 Reporter: DeepThought <deeptho@…> | Owner: matias
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Documentation
  Version: Boost 1.45.0 | Severity: Problem
 Keywords: |
---------------------------------------------+------------------------------
 The example at
 http://www.boost.org/doc/libs/1_35_0/doc/html/interprocess/offset_ptr.html
 is erroneous and misleading.

 First of all, some declarations about namespaces are missing.

 More importantly, the following line

   typedef ip::list<shared_memory_data> shm_list_t;

 defines shm_list_t in such a way that it uses **standard** allocators.
 This means that the list items are created in normal memory, which is not
 what the example intends.

 Even worse, the "Check all the inserted nodes" test fails to detect this
 problem.

 The example is problematic anyway, because it only deals with one process.

 The attachment could serve as a starting point for a good and working
 example.
 I suspect you won't like the printf's in it....

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5165>
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:05 UTC