mirror of
https://github.com/boostorg/python.git
synced 2026-01-28 07:22:31 +00:00
added test for vector<string>
[SVN r34374]
This commit is contained in:
@@ -53,5 +53,10 @@ BOOST_PYTHON_MODULE(vector_indexing_suite_ext)
|
||||
class_<std::vector<bool> >("BoolVec")
|
||||
.def(vector_indexing_suite<std::vector<bool> >())
|
||||
;
|
||||
|
||||
// vector of strings
|
||||
class_<std::vector<std::string> >("StringVec")
|
||||
.def(vector_indexing_suite<std::vector<std::string> >())
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -321,6 +321,12 @@ e
|
||||
>>> print_xvec(v)
|
||||
[ a b c d e f g h i j ]
|
||||
|
||||
#####################################################################
|
||||
# vector of strings
|
||||
#####################################################################
|
||||
>>> sv = StringVec()
|
||||
>>> sv.append('a')
|
||||
|
||||
#####################################################################
|
||||
# END....
|
||||
#####################################################################
|
||||
|
||||
Reference in New Issue
Block a user