Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / intrusive / example / doc_stateful_value_traits.cpp
index 376211a..2906220 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga  2007-2012
+// (C) Copyright Ion Gaztanaga  2007-2013
 //
 // Distributed under the Boost Software License, Version 1.0.
 //    (See accompanying file LICENSE_1_0.txt or copy at
@@ -36,11 +36,11 @@ struct stateful_value_traits
    {}
 
    ///Note: non static functions!
-   node_ptr to_node_ptr (value_type &value)
+   node_ptr to_node_ptr (value_type &value) const
       {  return this->nodes_ + (&value - this->ids_); }
    const_node_ptr to_node_ptr (const value_type &value) const
       {  return this->nodes_ + (&value - this->ids_); }
-   pointer to_value_ptr(node_ptr n)
+   pointer to_value_ptr(node_ptr n) const
       {  return this->ids_ + (n - this->nodes_); }
    const_pointer to_value_ptr(const_node_ptr n) const
       {  return this->ids_ + (n - this->nodes_); }