diff --git a/include/boost/python/suite/indexing/vector_indexing_suite.hpp b/include/boost/python/suite/indexing/vector_indexing_suite.hpp index 5c575828..b6290038 100644 --- a/include/boost/python/suite/indexing/vector_indexing_suite.hpp +++ b/include/boost/python/suite/indexing/vector_indexing_suite.hpp @@ -67,7 +67,12 @@ namespace boost { namespace python { ; } - static data_type& + static + typename mpl::if_< + is_class + , data_type& + , data_type + >::type get_item(Container& container, index_type i) { return container[i]; diff --git a/test/vector_indexing_suite.cpp b/test/vector_indexing_suite.cpp index c5b8eada..07fc5e91 100644 --- a/test/vector_indexing_suite.cpp +++ b/test/vector_indexing_suite.cpp @@ -44,5 +44,10 @@ BOOST_PYTHON_MODULE(vector_indexing_suite_ext) class_ >("FloatVec") .def(vector_indexing_suite >()) ; + + // Compile check only... + class_ >("BoolVec") + .def(vector_indexing_suite >()) + ; }