Skip to content

Commit

Permalink
minor test_private_first_base.cpp simplification (after discovering t…
Browse files Browse the repository at this point in the history
…hat this can be wrapped with Boost.Python, using boost::noncopyable)
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Dec 30, 2020
1 parent 6395100 commit 952086d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/test_private_first_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
};

Expand Down

0 comments on commit 952086d

Please sign in to comment.