[C++-sig] V2: corner case bug?
Peter Bienstman
pbienst at MIT.EDU
Thu Apr 4 18:55:55 CEST 2002
On Thu, 2002-04-04 at 11:13, David Abrahams wrote:
> This bug is now fixed in the CVS. Thanks for the report, Peter!
Thanks for the quick fix!
There is also another case were this issue manifests itself: in passing
abstract base classes to constructors:
#define BOOST_PYTHON_DYNAMIC_LIB
#define BOOST_PYTHON_V2
#include <boost/python/module.hpp>
#include <boost/python/class.hpp>
#include <boost/mpl/type_list.hpp>
struct V
{
virtual void f() = 0;
};
struct B
{
B(const V&) {}
};
BOOST_PYTHON_MODULE_INIT(m)
{
using namespace boost::python;
using boost::mpl::type_list;
module m("m");
m
.add(
class_<V, boost::noncopyable>("V")
)
.add(
class_<B>("B")
.def_init(type_list<const V&>())
)
;
}
More information about the Cplusplus-sig
mailing list