Skip to content

Commit bd74676

Browse files
committed
Work around the stupid VC++/Intel bug that retains argument constness in function signatures.
[SVN r25437]
1 parent 70e012b commit bd74676

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

include/boost/python/arg_from_python.hpp

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,33 @@
77

88
# include <boost/python/detail/prefix.hpp>
99
# include <boost/python/converter/arg_from_python.hpp>
10+
# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
11+
|| BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(800))
12+
# include <boost/type_traits/remove_cv.hpp>
13+
#endif
1014

1115
namespace boost { namespace python {
1216

1317
template <class T>
1418
struct arg_from_python
15-
: converter::select_arg_from_python<T>::type
19+
: converter::select_arg_from_python<
20+
# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
21+
|| BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(800))
22+
typename boost::remove_cv<T>::type
23+
# else
24+
T
25+
# endif
26+
>::type
1627
{
17-
typedef typename converter::select_arg_from_python<T>::type base;
28+
typedef typename converter::select_arg_from_python<
29+
# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
30+
|| BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(800))
31+
typename boost::remove_cv<T>::type
32+
# else
33+
T
34+
# endif
35+
>::type base;
36+
1837
arg_from_python(PyObject*);
1938
};
2039

0 commit comments

Comments
 (0)