Fixed stateful value traits and iterator_to.

This commit is contained in:
Ion Gaztañaga committed 2014-02-14 23:16:48 +01:00
1 parent 36a5b82a33
commit 22973145aa
8 files changed
+46 -19

No files matched your search

+2 -2
View File
@@ -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_); }