From 163bb06a43fd61a3a1925f24e7119dbfd25de494 Mon Sep 17 00:00:00 2001 From: nobody Date: Wed, 11 Sep 2002 05:35:42 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'mpl_v2'. [SVN r15259] --- test/bienstman4.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ test/bienstman5.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 test/bienstman4.cpp create mode 100644 test/bienstman5.cpp diff --git a/test/bienstman4.cpp b/test/bienstman4.cpp new file mode 100644 index 00000000..324af85a --- /dev/null +++ b/test/bienstman4.cpp @@ -0,0 +1,40 @@ +// Copyright David Abrahams 2002. Permission to copy, use, +// modify, sell and distribute this software is granted provided this +// copyright notice appears in all copies. This software is provided +// "as is" without express or implied warranty, and with no claim as +// to its suitability for any purpose. + +#include +#include +#include +#include +#include + +struct Type1 {}; + +struct Term {Term(Type1 const&) {} }; + +struct Expression {void add(Term const&) {} }; + +BOOST_PYTHON_MODULE_INIT(bienstman4_ext) +{ + using namespace boost::python; + using boost::mpl::list; + + implicitly_convertible(); + + class_("Expression") + .def("add", &Expression::add) + ; + + class_("T1") + ; + + class_("Term", args()) + ; + + Type1 t1; + Expression e; + e.add(t1); +} + diff --git a/test/bienstman5.cpp b/test/bienstman5.cpp new file mode 100644 index 00000000..007d12a9 --- /dev/null +++ b/test/bienstman5.cpp @@ -0,0 +1,24 @@ +// Copyright David Abrahams 2002. Permission to copy, use, +// modify, sell and distribute this software is granted provided this +// copyright notice appears in all copies. This software is provided +// "as is" without express or implied warranty, and with no claim as +// to its suitability for any purpose. + +#include +#include +#include +#include + +#include + +struct M {M(const std::complex&) {} }; + +BOOST_PYTHON_MODULE_INIT(bienstman5_ext) +{ + using namespace boost::python; + + class_("M", args const&>()) + ; +} + +