From 92d2eb957407c16d1eca3598e00e6c16cbe4e7e7 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 10 Jun 2010 16:32:24 -0400 Subject: 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." --- src/py_value.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/py_value.cc') 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. 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; -- cgit v1.2.3