diff --git a/src/dfi/govvariables/attributes.cpp b/src/dfi/govvariables/attributes.cpp index a71f373b46..c10e626535 100644 --- a/src/dfi/govvariables/attributes.cpp +++ b/src/dfi/govvariables/attributes.cpp @@ -701,8 +701,8 @@ static inline void rtrim(std::string &s, unsigned char remove) { s.erase(std::find_if(s.rbegin(), s.rend(), [&remove](unsigned char ch) { return ch != remove; }).base(), s.end()); } -const std::map(const std::string &)>>> & -ATTRIBUTES::parseValue() { +const std::map(const std::string &)>>> + &ATTRIBUTES::parseValue() { static const std::map(const std::string &)>>> parsers{ {AttributeTypes::Token, diff --git a/src/dfi/govvariables/attributes.h b/src/dfi/govvariables/attributes.h index 85325fcd68..6cb7852e0b 100644 --- a/src/dfi/govvariables/attributes.h +++ b/src/dfi/govvariables/attributes.h @@ -531,8 +531,8 @@ class ATTRIBUTES : public GovVariable, public AutoRegistrator &allowedVaultIDs(); static const std::map &allowedRulesIDs(); static const std::map> &allowedKeys(); - static const std::map(const std::string &)>>> & - parseValue(); + static const std::map(const std::string &)>>> + &parseValue(); Res ProcessVariable(const std::string &key, const std::optional &value, diff --git a/src/ffi/cxx.h b/src/ffi/cxx.h index b4a4bc7f30..1fc163b2d8 100644 --- a/src/ffi/cxx.h +++ b/src/ffi/cxx.h @@ -55,8 +55,8 @@ namespace rust { static String lossy(const char16_t *) noexcept; static String lossy(const char16_t *, std::size_t) noexcept; - String &operator=(const String &) & noexcept; - String &operator=(String &&) & noexcept; + String &operator=(const String &) &noexcept; + String &operator=(String &&) &noexcept; explicit operator std::string() const; @@ -115,7 +115,7 @@ namespace rust { Str(const char *); Str(const char *, std::size_t); - Str &operator=(const Str &) & noexcept = default; + Str &operator=(const Str &) &noexcept = default; explicit operator std::string() const; @@ -163,8 +163,8 @@ namespace rust { struct copy_assignable_if { copy_assignable_if() noexcept = default; copy_assignable_if(const copy_assignable_if &) noexcept = default; - copy_assignable_if &operator=(const copy_assignable_if &) & noexcept = delete; - copy_assignable_if &operator=(copy_assignable_if &&) & noexcept = default; + copy_assignable_if &operator=(const copy_assignable_if &) &noexcept = delete; + copy_assignable_if &operator=(copy_assignable_if &&) &noexcept = default; }; } // namespace detail @@ -177,8 +177,8 @@ namespace rust { Slice() noexcept; Slice(T *, std::size_t count) noexcept; - Slice &operator=(const Slice &) & noexcept = default; - Slice &operator=(Slice &&) & noexcept = default; + Slice &operator=(const Slice &) &noexcept = default; + Slice &operator=(Slice &&) &noexcept = default; T *data() const noexcept; std::size_t size() const noexcept; @@ -265,7 +265,7 @@ namespace rust { explicit Box(const T &); explicit Box(T &&); - Box &operator=(Box &&) & noexcept; + Box &operator=(Box &&) &noexcept; const T *operator->() const noexcept; const T &operator*() const noexcept; @@ -310,7 +310,7 @@ namespace rust { Vec(Vec &&) noexcept; ~Vec() noexcept; - Vec &operator=(Vec &&) & noexcept; + Vec &operator=(Vec &&) &noexcept; Vec &operator=(const Vec &) &; std::size_t size() const noexcept; @@ -391,7 +391,7 @@ namespace rust { ~Error() noexcept override; Error &operator=(const Error &) &; - Error &operator=(Error &&) & noexcept; + Error &operator=(Error &&) &noexcept; const char *what() const noexcept override; @@ -758,7 +758,7 @@ namespace rust { } template - Box &Box::operator=(Box &&other) & noexcept { + Box &Box::operator=(Box &&other) &noexcept { if (this->ptr) { this->drop(); } @@ -849,7 +849,7 @@ namespace rust { } template - Vec &Vec::operator=(Vec &&other) & noexcept { + Vec &Vec::operator=(Vec &&other) &noexcept { this->drop(); this->repr = other.repr; new (&other) Vec();