Skip to content

Commit a076239

Browse files
committed
std::string and std::complex as no-proxy types.
[SVN r31717]
1 parent 7cf0f90 commit a076239

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

include/boost/python/suite/indexing/indexing_suite.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# include <boost/python/iterator.hpp>
1515
# include <boost/mpl/or.hpp>
1616
# include <boost/mpl/not.hpp>
17+
# include <boost/type_traits/is_same.hpp>
1718

1819
namespace boost { namespace python {
1920

@@ -119,7 +120,12 @@ namespace boost { namespace python {
119120

120121
typedef mpl::or_<
121122
mpl::bool_<NoProxy>
122-
, mpl::not_<is_class<Data> > >
123+
, mpl::not_<is_class<Data> >
124+
, typename mpl::or_<
125+
is_same<Data, std::string>
126+
, is_same<Data, std::complex<float> >
127+
, is_same<Data, std::complex<double> >
128+
, is_same<Data, std::complex<long double> > >::type>
123129
no_proxy;
124130

125131
typedef detail::container_element<Container, Index, DerivedPolicies>

include/boost/python/suite/indexing/map_indexing_suite.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace boost { namespace python {
2626
}
2727

2828
// The map_indexing_suite class is a predefined indexing_suite derived
29-
// class for wrapping std::vector (and std::vector like) classes. It provides
29+
// class for wrapping std::map (and std::map like) classes. It provides
3030
// all the policies required by the indexing_suite (see indexing_suite).
3131
// Example usage:
3232
//

0 commit comments

Comments
 (0)