Inheriting constructors and virtual base classes
问题 I'm about to create an exception class hierarchy which conceptually looks somewhat like this: #include <iostream> #include <stdexcept> class ExceptionBase : public std::runtime_error { public: ExceptionBase( const char * msg ) : std::runtime_error(msg) {} }; class OperationFailure : virtual public ExceptionBase { public: using ExceptionBase::ExceptionBase; }; class FileDoesNotExistError : virtual public ExceptionBase { public: using ExceptionBase::ExceptionBase; }; class