Skip to content

Commit

Permalink
Merge pull request #68 from toge/remove-template-id
Browse files Browse the repository at this point in the history
remove template id from constructor/destructor
  • Loading branch information
generalmimon authored Oct 27, 2023
2 parents cd3f649 + 4211cd4 commit c3a3af8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions kaitai/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class validation_failed_error: public kstruct_error {
template<typename T>
class validation_not_equal_error: public validation_failed_error {
public:
validation_not_equal_error<T>(const T& expected, const T& actual, kstream* io, const std::string src_path):
validation_not_equal_error(const T& expected, const T& actual, kstream* io, const std::string src_path):
validation_failed_error("not equal", io, src_path),
m_expected(expected),
m_actual(actual)
Expand All @@ -124,7 +124,7 @@ class validation_not_equal_error: public validation_failed_error {

// "not equal, expected #{expected.inspect}, but got #{actual.inspect}"

virtual ~validation_not_equal_error<T>() KS_NOEXCEPT {};
virtual ~validation_not_equal_error() KS_NOEXCEPT {};

protected:
const T& m_expected;
Expand All @@ -138,7 +138,7 @@ class validation_not_equal_error: public validation_failed_error {
template<typename T>
class validation_less_than_error: public validation_failed_error {
public:
validation_less_than_error<T>(const T& min, const T& actual, kstream* io, const std::string src_path):
validation_less_than_error(const T& min, const T& actual, kstream* io, const std::string src_path):
validation_failed_error("not in range", io, src_path),
m_min(min),
m_actual(actual)
Expand All @@ -147,7 +147,7 @@ class validation_less_than_error: public validation_failed_error {

// "not in range, min #{min.inspect}, but got #{actual.inspect}"

virtual ~validation_less_than_error<T>() KS_NOEXCEPT {};
virtual ~validation_less_than_error() KS_NOEXCEPT {};

protected:
const T& m_min;
Expand All @@ -161,7 +161,7 @@ class validation_less_than_error: public validation_failed_error {
template<typename T>
class validation_greater_than_error: public validation_failed_error {
public:
validation_greater_than_error<T>(const T& max, const T& actual, kstream* io, const std::string src_path):
validation_greater_than_error(const T& max, const T& actual, kstream* io, const std::string src_path):
validation_failed_error("not in range", io, src_path),
m_max(max),
m_actual(actual)
Expand All @@ -170,7 +170,7 @@ class validation_greater_than_error: public validation_failed_error {

// "not in range, max #{max.inspect}, but got #{actual.inspect}"

virtual ~validation_greater_than_error<T>() KS_NOEXCEPT {};
virtual ~validation_greater_than_error() KS_NOEXCEPT {};

protected:
const T& m_max;
Expand All @@ -184,15 +184,15 @@ class validation_greater_than_error: public validation_failed_error {
template<typename T>
class validation_not_any_of_error: public validation_failed_error {
public:
validation_not_any_of_error<T>(const T& actual, kstream* io, const std::string src_path):
validation_not_any_of_error(const T& actual, kstream* io, const std::string src_path):
validation_failed_error("not any of the list", io, src_path),
m_actual(actual)
{
}

// "not any of the list, got #{actual.inspect}"

virtual ~validation_not_any_of_error<T>() KS_NOEXCEPT {};
virtual ~validation_not_any_of_error() KS_NOEXCEPT {};

protected:
const T& m_actual;
Expand All @@ -205,15 +205,15 @@ class validation_not_any_of_error: public validation_failed_error {
template<typename T>
class validation_expr_error: public validation_failed_error {
public:
validation_expr_error<T>(const T& actual, kstream* io, const std::string src_path):
validation_expr_error(const T& actual, kstream* io, const std::string src_path):
validation_failed_error("not matching the expression", io, src_path),
m_actual(actual)
{
}

// "not matching the expression, got #{actual.inspect}"

virtual ~validation_expr_error<T>() KS_NOEXCEPT {};
virtual ~validation_expr_error() KS_NOEXCEPT {};

protected:
const T& m_actual;
Expand Down

0 comments on commit c3a3af8

Please sign in to comment.