cmdopt: remove unnecessary virtual keywords
This commit is contained in:
parent
82849cc157
commit
46873e0931
17
cmdopt.hpp
17
cmdopt.hpp
@ -125,6 +125,7 @@ namespace util::cmdopt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
class parser {
|
class parser {
|
||||||
public:
|
public:
|
||||||
template <typename T, typename ...Args>
|
template <typename T, typename ...Args>
|
||||||
@ -161,40 +162,46 @@ namespace util::cmdopt {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
class error : public std::exception { };
|
class error : public std::exception { };
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
class invalid_key : public error {
|
class invalid_key : public error {
|
||||||
public:
|
public:
|
||||||
invalid_key (std::string _key);
|
invalid_key (std::string _key);
|
||||||
virtual const char* what (void) const noexcept override;
|
const char* what (void) const noexcept override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::string m_key;
|
const std::string m_key;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
class invalid_value : public error {
|
class invalid_value : public error {
|
||||||
public:
|
public:
|
||||||
invalid_value (std::string _value);
|
invalid_value (std::string _value);
|
||||||
virtual const char* what (void) const noexcept override;
|
const char* what (void) const noexcept override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::string m_value;
|
const std::string m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
class invalid_null : public error {
|
class invalid_null : public error {
|
||||||
public:
|
public:
|
||||||
virtual const char* what (void) const noexcept override;
|
const char* what (void) const noexcept override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
class invalid_required : public error {
|
class invalid_required : public error {
|
||||||
public:
|
public:
|
||||||
virtual const char* what (void) const noexcept override;
|
const char* what (void) const noexcept override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
class unhandled_argument : public error {
|
class unhandled_argument : public error {
|
||||||
public:
|
public:
|
||||||
unhandled_argument (int index);
|
unhandled_argument (int index);
|
||||||
virtual const char* what (void) const noexcept override;
|
const char* what (void) const noexcept override;
|
||||||
|
|
||||||
int index (void) const noexcept;
|
int index (void) const noexcept;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user