@@ -53,8 +53,8 @@ class String final {
53
53
static String lossy (const char16_t *) noexcept ;
54
54
static String lossy (const char16_t *, std::size_t ) noexcept ;
55
55
56
- String &operator =(const String &) &noexcept ;
57
- String &operator =(String &&) &noexcept ;
56
+ String &operator =(const String &) & noexcept ;
57
+ String &operator =(String &&) & noexcept ;
58
58
59
59
explicit operator std::string () const ;
60
60
@@ -113,7 +113,7 @@ class Str final {
113
113
Str (const char *);
114
114
Str (const char *, std::size_t );
115
115
116
- Str &operator =(const Str &) &noexcept = default ;
116
+ Str &operator =(const Str &) & noexcept = default ;
117
117
118
118
explicit operator std::string () const ;
119
119
@@ -161,8 +161,8 @@ template <>
161
161
struct copy_assignable_if <false > {
162
162
copy_assignable_if () noexcept = default ;
163
163
copy_assignable_if (const copy_assignable_if &) noexcept = default ;
164
- copy_assignable_if &operator =(const copy_assignable_if &) &noexcept = delete ;
165
- copy_assignable_if &operator =(copy_assignable_if &&) &noexcept = default ;
164
+ copy_assignable_if &operator =(const copy_assignable_if &) & noexcept = delete ;
165
+ copy_assignable_if &operator =(copy_assignable_if &&) & noexcept = default ;
166
166
};
167
167
} // namespace detail
168
168
@@ -179,8 +179,8 @@ class Slice final
179
179
template <typename C>
180
180
explicit Slice (C &c) : Slice(c.data(), c.size()) {}
181
181
182
- Slice &operator =(const Slice<T> &) &noexcept = default ;
183
- Slice &operator =(Slice<T> &&) &noexcept = default ;
182
+ Slice &operator =(const Slice<T> &) & noexcept = default ;
183
+ Slice &operator =(Slice<T> &&) & noexcept = default ;
184
184
185
185
T *data () const noexcept ;
186
186
std::size_t size () const noexcept ;
@@ -281,7 +281,7 @@ class Box final {
281
281
explicit Box (const T &);
282
282
explicit Box (T &&);
283
283
284
- Box &operator =(Box &&) &noexcept ;
284
+ Box &operator =(Box &&) & noexcept ;
285
285
286
286
const T *operator ->() const noexcept ;
287
287
const T &operator *() const noexcept ;
@@ -326,7 +326,7 @@ class Vec final {
326
326
Vec (Vec &&) noexcept ;
327
327
~Vec () noexcept ;
328
328
329
- Vec &operator =(Vec &&) &noexcept ;
329
+ Vec &operator =(Vec &&) & noexcept ;
330
330
Vec &operator =(const Vec &) &;
331
331
332
332
std::size_t size () const noexcept ;
@@ -407,7 +407,7 @@ class Error final : public std::exception {
407
407
~Error () noexcept override ;
408
408
409
409
Error &operator =(const Error &) &;
410
- Error &operator =(Error &&) &noexcept ;
410
+ Error &operator =(Error &&) & noexcept ;
411
411
412
412
const char *what () const noexcept override ;
413
413
@@ -779,7 +779,7 @@ Box<T>::~Box() noexcept {
779
779
}
780
780
781
781
template <typename T>
782
- Box<T> &Box<T>::operator =(Box &&other) &noexcept {
782
+ Box<T> &Box<T>::operator =(Box &&other) & noexcept {
783
783
if (this ->ptr ) {
784
784
this ->drop ();
785
785
}
@@ -867,7 +867,7 @@ Vec<T>::~Vec() noexcept {
867
867
}
868
868
869
869
template <typename T>
870
- Vec<T> &Vec<T>::operator =(Vec &&other) &noexcept {
870
+ Vec<T> &Vec<T>::operator =(Vec &&other) & noexcept {
871
871
this ->drop ();
872
872
this ->repr = other.repr ;
873
873
new (&other) Vec ();
0 commit comments