Skip to content

Commit

Permalink
Re #12687 Troubling pure virtual function with diamond inheritance.
Browse files Browse the repository at this point in the history
Workaround, see comments in code.
  • Loading branch information
SimonHeybrock committed Jul 2, 2015
1 parent 3deb7d1 commit 68e1d02
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ class DLLExport ISplittersWorkspace : virtual public API::ITableWorkspace {
ISplittersWorkspace &operator=(const ISplittersWorkspace &other);

private:
virtual ISplittersWorkspace *doClone() const = 0;
// Windows Visual Studio 2012 seems to have trouble with a pure virtual
// function in combination with diamond inheritance, so we provide an
// implementation that throws an error instead.
virtual ISplittersWorkspace *doClone() const {
throw std::runtime_error(
"Cloning of ISplittersWorkspace is not implemented.");
}
};

/// Typedef for a shared pointer to \c TableWorkspace
Expand Down

0 comments on commit 68e1d02

Please sign in to comment.