2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

fix for wrapping vector<bool>

[SVN r19692]
This commit is contained in:
Joel de Guzman
2003-08-19 03:28:53 +00:00
parent 4e3f3a052d
commit cfb13fad22
2 changed files with 11 additions and 1 deletions

View File

@@ -67,7 +67,12 @@ namespace boost { namespace python {
;
}
static data_type&
static
typename mpl::if_<
is_class<data_type>
, data_type&
, data_type
>::type
get_item(Container& container, index_type i)
{
return container[i];

View File

@@ -44,5 +44,10 @@ BOOST_PYTHON_MODULE(vector_indexing_suite_ext)
class_<std::vector<float> >("FloatVec")
.def(vector_indexing_suite<std::vector<float> >())
;
// Compile check only...
class_<std::vector<bool> >("BoolVec")
.def(vector_indexing_suite<std::vector<bool> >())
;
}