summaryrefslogtreecommitdiff
path: root/src/py_value.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-10 16:32:24 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-10 16:32:24 -0400
commit92d2eb957407c16d1eca3598e00e6c16cbe4e7e7 (patch)
treebaea9d1514cd878a7cfe9396e497f7d08d134e0d /src/py_value.cc
parent5659b6fb37b8601c39be6ecec3c8c86625686e0f (diff)
downloadfork-ledger-92d2eb957407c16d1eca3598e00e6c16cbe4e7e7.tar.gz
fork-ledger-92d2eb957407c16d1eca3598e00e6c16cbe4e7e7.tar.bz2
fork-ledger-92d2eb957407c16d1eca3598e00e6c16cbe4e7e7.zip
Use ptr_deque for value_t::sequence_t
This is to work around undefined behavior according to the Standard, [lib.res.on.functions]/2: "In particular, the effects are undefined in the following cases: [..] - if an incomplete type (3.9) is used as a template argument when instantiating a template component."
Diffstat (limited to 'src/py_value.cc')
-rw-r--r--src/py_value.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/py_value.cc b/src/py_value.cc
index 46fa94c3..dabda427 100644
--- a/src/py_value.cc
+++ b/src/py_value.cc
@@ -352,9 +352,13 @@ void export_value()
.def("basetype", py_base_type)
;
+#if 0
+ // jww (2010-06-10): This is not working since I switched sequence_t to
+ // ptr_deque<value_t>.
class_< value_t::sequence_t > ("ValueSequence")
- .def(vector_indexing_suite< value_t::sequence_t >());
+ .def(vector_indexing_suite< value_t::sequence_t, true >());
;
+#endif
scope().attr("NULL_VALUE") = NULL_VALUE;
scope().attr("string_value") = &string_value;