We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e3f3a0 commit cfb13faCopy full SHA for cfb13fa
include/boost/python/suite/indexing/vector_indexing_suite.hpp
@@ -67,7 +67,12 @@ namespace boost { namespace python {
67
;
68
}
69
70
- static data_type&
+ static
71
+ typename mpl::if_<
72
+ is_class<data_type>
73
+ , data_type&
74
+ , data_type
75
+ >::type
76
get_item(Container& container, index_type i)
77
{
78
return container[i];
test/vector_indexing_suite.cpp
@@ -44,5 +44,10 @@ BOOST_PYTHON_MODULE(vector_indexing_suite_ext)
44
class_<std::vector<float> >("FloatVec")
45
.def(vector_indexing_suite<std::vector<float> >())
46
47
+
48
+ // Compile check only...
49
+ class_<std::vector<bool> >("BoolVec")
50
+ .def(vector_indexing_suite<std::vector<bool> >())
51
+ ;
52
53
0 commit comments