Skip to content

Commit fa8cffb

Browse files
author
Aleksey Gurtovoy
committed
taking care of const_argument test failures (see http://thread.gmane.org/gmane.comp.python.c++/7221)
[SVN r25848]
1 parent 11daf8d commit fa8cffb

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

test/const_argument.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,28 @@
99
* compiler's bug.
1010
*/
1111
#include <boost/python.hpp>
12+
#include <boost/type_traits/broken_compiler_spec.hpp>
1213
using namespace boost::python;
1314

14-
bool accept_const_arg_noproto( const object)
15+
BOOST_TT_BROKEN_COMPILER_SPEC( object )
16+
17+
#if !BOOST_WORKAROUND(BOOST_MSVC, == 1200)
18+
bool accept_const_arg_noproto( const object )
1519
{
1620
return true;
1721
}
22+
#endif
1823

19-
bool accept_const_arg_with_proto( object);
20-
bool accept_const_arg_with_proto( const object)
24+
bool accept_const_arg_with_proto( object );
25+
bool accept_const_arg_with_proto( const object )
2126
{
2227
return true;
2328
}
2429

25-
BOOST_PYTHON_MODULE( const_argument_ext)
30+
BOOST_PYTHON_MODULE( const_argument_ext )
2631
{
27-
def( "accept_const_arg_noproto", accept_const_arg_noproto);
28-
def( "accept_const_arg_with_proto", accept_const_arg_with_proto);
32+
#if !BOOST_WORKAROUND(BOOST_MSVC, == 1200)
33+
def( "accept_const_arg_noproto", accept_const_arg_noproto );
34+
#endif
35+
def( "accept_const_arg_with_proto", accept_const_arg_with_proto );
2936
}
30-

0 commit comments

Comments
 (0)