Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/python/test/const_argument.cpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 872 bytes
Line 
1/* Copyright 2004 Jonathan Brandmeyer
2 * Use, modification and distribution are subject to the
3 * Boost Software License, Version 1.0. (See accompanying file
4 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 *
6 * The purpose of this test is to determine if a function can be called from
7 * Python with a const value type as an argument, and whether or not the
8 * presence of a prototype without the cv-qualifier will work around the
9 * compiler's bug.
10 */
11#include <boost/python.hpp>
12#include <boost/type_traits/broken_compiler_spec.hpp>
13using namespace boost::python;
14
15BOOST_TT_BROKEN_COMPILER_SPEC( object )
16
17#if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
18bool accept_const_arg( object );
19#endif
20
21bool accept_const_arg( const object )
22{
23    return true; 
24}
25
26
27BOOST_PYTHON_MODULE( const_argument_ext )
28{
29    def( "accept_const_arg", accept_const_arg );
30}
Note: See TracBrowser for help on using the repository browser.