Skip to content

Commit

Permalink
Use BOOST_DEFAULTED_FUNCTION on empty destructors (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecatmur committed Jun 7, 2023
1 parent 6fedd44 commit ce3fda3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions include/boost/test/utils/runtime/errors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace runtime {

class BOOST_SYMBOL_VISIBLE param_error : public std::exception {
public:
~param_error() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {}
BOOST_DEFAULTED_FUNCTION(~param_error() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE, {})

const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE
{
Expand All @@ -58,13 +58,13 @@ class BOOST_SYMBOL_VISIBLE param_error : public std::exception {
class BOOST_SYMBOL_VISIBLE init_error : public param_error {
protected:
explicit init_error( cstring param_name ) : param_error( param_name ) {}
~init_error() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {}
BOOST_DEFAULTED_FUNCTION(~init_error() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE, {})
};

class BOOST_SYMBOL_VISIBLE input_error : public param_error {
protected:
explicit input_error( cstring param_name ) : param_error( param_name ) {}
~input_error() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {}
BOOST_DEFAULTED_FUNCTION(~input_error() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE, {})
};

//____________________________________________________________________________//
Expand All @@ -73,7 +73,7 @@ template<typename Derived, typename Base>
class BOOST_SYMBOL_VISIBLE specific_param_error : public Base {
protected:
explicit specific_param_error( cstring param_name ) : Base( param_name ) {}
~specific_param_error() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {}
BOOST_DEFAULTED_FUNCTION(~specific_param_error() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE, {})

public:

Expand Down Expand Up @@ -166,7 +166,7 @@ class BOOST_SYMBOL_VISIBLE ambiguous_param : public specific_param_error<ambiguo
: specific_param_error<ambiguous_param,input_error>( "" )
, m_amb_candidates( amb_candidates ) {}
#endif
~ambiguous_param() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {}
BOOST_DEFAULTED_FUNCTION(~ambiguous_param() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE, {})

std::vector<cstring> m_amb_candidates;
};
Expand All @@ -182,7 +182,7 @@ class BOOST_SYMBOL_VISIBLE unrecognized_param : public specific_param_error<unre
: specific_param_error<unrecognized_param,input_error>( "" )
, m_typo_candidates( type_candidates ) {}
#endif
~unrecognized_param() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {}
BOOST_DEFAULTED_FUNCTION(~unrecognized_param() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE, {})

std::vector<cstring> m_typo_candidates;
};
Expand Down
2 changes: 1 addition & 1 deletion include/boost/test/utils/runtime/parameter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class basic_param {
}

public:
virtual ~basic_param() {}
BOOST_DEFAULTED_FUNCTION(virtual ~basic_param(), {})

// Pubic properties
std::string const p_name;
Expand Down

0 comments on commit ce3fda3

Please sign in to comment.