1 // Copyright David Abrahams 2004. Distributed under the Boost 2 // Software License, Version 1.0. (See accompanying 3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 #include <boost/python/module.hpp> 5 #include <boost/python/def.hpp> 6 #include <boost/python/class.hpp> 7 8 struct C {}; 9 10 struct D {}; 11 12 struct E 13 { feE14 const D fe (const C&) {return D();} fe2E15 const D fe2(const C&, const C&) {return D();} 16 }; 17 BOOST_PYTHON_MODULE(bienstman2_ext)18BOOST_PYTHON_MODULE(bienstman2_ext) 19 { 20 using namespace boost::python; 21 22 class_<C>("C"); 23 class_<D>("D"); 24 class_<E>("E") 25 .def("fe", &E::fe) // this compiles. 26 .def("fe2", &E::fe2) // this doesn't... well, now it does ;-) 27 ; 28 } 29