mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 20:16:12 +08:00
Fix inconsistent noexcept-ness between header/implementation
Even though we disable exceptions, we use noexcept in some places to enable certain optimizations in std::vector, see https://en.cppreference.com/w/cpp/utility/move_if_noexcept. Some methods have noexcept only at their declaration (or only at the definition). This will be an error when compiling with "g++ -std=c++17". Make both signatures match.
This commit is contained in:
parent
8c7ba5efea
commit
ccb6cb1abe
|
@ -54,7 +54,7 @@ class autoload_t {
|
|||
/// Construct an autoloader that loads from the paths given by \p env_var_name.
|
||||
explicit autoload_t(wcstring env_var_name);
|
||||
|
||||
autoload_t(autoload_t &&);
|
||||
autoload_t(autoload_t &&) noexcept;
|
||||
~autoload_t();
|
||||
|
||||
/// Given a command, get a path to autoload.
|
||||
|
|
|
@ -226,9 +226,9 @@ completion_t::completion_t(wcstring comp, wcstring desc, string_fuzzy_match_t ma
|
|||
flags(resolve_auto_space(completion, flags_val)) {}
|
||||
|
||||
completion_t::completion_t(const completion_t &) = default;
|
||||
completion_t::completion_t(completion_t &&) = default;
|
||||
completion_t::completion_t(completion_t &&) noexcept = default;
|
||||
completion_t &completion_t::operator=(const completion_t &) = default;
|
||||
completion_t &completion_t::operator=(completion_t &&) = default;
|
||||
completion_t &completion_t::operator=(completion_t &&) noexcept = default;
|
||||
completion_t::~completion_t() = default;
|
||||
|
||||
__attribute__((always_inline)) static inline bool natural_compare_completions(
|
||||
|
|
Loading…
Reference in New Issue
Block a user