Skip to content

Commit

Permalink
command_line/options: Adjust the arguments_t copy constructor/operato…
Browse files Browse the repository at this point in the history
…r `noexcept` markings noting that std::multiset can throw when copied
  • Loading branch information
dragonmux committed Jan 10, 2024
1 parent c5f6f5b commit b74a01b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions impl/command_line/arguments.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,10 @@ namespace substrate::commandLine

// Implementation of the innards of arguments_t as otherwise we get compile errors
arguments_t::arguments_t() noexcept = default;
arguments_t::arguments_t(const arguments_t &arguments) noexcept = default;
arguments_t::arguments_t(const arguments_t &arguments) = default;
arguments_t::arguments_t(arguments_t &&arguments) noexcept = default;
arguments_t::~arguments_t() noexcept = default;
arguments_t &arguments_t::operator =(const arguments_t &arguments) noexcept = default;
arguments_t &arguments_t::operator =(const arguments_t &arguments) = default;
arguments_t &arguments_t::operator =(arguments_t &&arguments) noexcept = default;

Check warning on line 480 in impl/command_line/arguments.cxx

View check run for this annotation

Codecov / codecov/patch

impl/command_line/arguments.cxx#L479-L480

Added lines #L479 - L480 were not covered by tests
size_t arguments_t::count() const noexcept
{ return _arguments.size(); }
Expand Down
4 changes: 2 additions & 2 deletions substrate/command_line/arguments
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ namespace substrate::commandLine

public:
arguments_t() noexcept;
arguments_t(const arguments_t &arguments) noexcept;
arguments_t(const arguments_t &arguments);
arguments_t(arguments_t &&arguments) noexcept;
~arguments_t() noexcept;
arguments_t &operator =(const arguments_t &arguments) noexcept;
arguments_t &operator =(const arguments_t &arguments);
arguments_t &operator =(arguments_t &&arguments) noexcept;

[[nodiscard]] bool parseFrom(internal::tokeniser_t &lexer, const options_t &options,
Expand Down

0 comments on commit b74a01b

Please sign in to comment.