mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 16:13:53 +00:00
minor test_private_first_base.cpp simplification (after discovering that this can be wrapped with Boost.Python, using boost::noncopyable)
This commit is contained in:
parent
912ce16d0c
commit
8a393e68ab
@ -28,19 +28,16 @@ struct base {
|
||||
base() : base_id(100) {}
|
||||
virtual ~base() = default;
|
||||
virtual int id() const { return base_id; }
|
||||
base(const base&) = default;
|
||||
base(const base&) = delete;
|
||||
int base_id;
|
||||
};
|
||||
|
||||
struct private_first_base { // Any class with a virtual function will do.
|
||||
private_first_base() {}
|
||||
virtual void some_other_virtual_function() const {}
|
||||
virtual ~private_first_base() = default;
|
||||
private_first_base(const private_first_base&) = default;
|
||||
};
|
||||
|
||||
struct drvd : private private_first_base, public base {
|
||||
drvd() {}
|
||||
int id() const override { return 2 * base_id; }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user