[Boost-bugs] [Boost C++ Libraries] #9650: intrusive list with stateful value traits

Subject: [Boost-bugs] [Boost C++ Libraries] #9650: intrusive list with stateful value traits
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-10 20:38:36


#9650: intrusive list with stateful value traits
-------------------------------------------------+-------------------------
 Reporter: Matei David <matei@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: intrusive
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: intrusive list iterator_to with |
  stateful traits |
-------------------------------------------------+-------------------------
 In 1.55, in file `boost/intrusive/list.hpp`, in function
 `list_impl::iterator_to()`: when `list_impl` is instantiated with stateful
 value traits, the function attempts to call a non-static member without an
 object.

 The problem is that `list_impl` does not derive from `value_traits`,
 instead, only its member `data_` derives from `value_traits`. Then, inside
 the non-static `iterator_to()`, the syntax
 `real_value_traits::to_node_ptr()` is incorrect. In contrast, e.g.,
 `bstbase3` does derive from `value_traits`, and there the same syntax
 works just fine.

 I'm attaching a file demonstrating the bug. The file contains the sample
 code at the bottom of
 http://www.boost.org/doc/libs/1_55_0/doc/html/intrusive/value_traits.html
 with a single line modification invoking `iterator_to()`. I'll create a
 pull request.

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