Skip to content

Commit 45a2a69

Browse files
committed
更新依赖
1 parent a3facc8 commit 45a2a69

File tree

4 files changed

+40
-44
lines changed

4 files changed

+40
-44
lines changed

qt1/bridge.cpp

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class String final {
4747
String(const char *);
4848
String(const char *, std::size_t);
4949

50-
String &operator=(const String &) noexcept;
51-
String &operator=(String &&) noexcept;
50+
String &operator=(const String &) & noexcept;
51+
String &operator=(String &&) & noexcept;
5252

5353
explicit operator std::string() const;
5454

@@ -96,7 +96,7 @@ class Str final {
9696
Str(const char *);
9797
Str(const char *, std::size_t);
9898

99-
Str &operator=(const Str &) noexcept = default;
99+
Str &operator=(const Str &) & noexcept = default;
100100

101101
explicit operator std::string() const;
102102

@@ -142,8 +142,8 @@ template <>
142142
struct copy_assignable_if<false> {
143143
copy_assignable_if() noexcept = default;
144144
copy_assignable_if(const copy_assignable_if &) noexcept = default;
145-
copy_assignable_if &operator=(const copy_assignable_if &) noexcept = delete;
146-
copy_assignable_if &operator=(copy_assignable_if &&) noexcept = default;
145+
copy_assignable_if &operator=(const copy_assignable_if &) & noexcept = delete;
146+
copy_assignable_if &operator=(copy_assignable_if &&) & noexcept = default;
147147
};
148148
} // namespace detail
149149

@@ -156,8 +156,8 @@ class Slice final
156156
Slice() noexcept;
157157
Slice(T *, std::size_t count) noexcept;
158158

159-
Slice &operator=(const Slice<T> &) noexcept = default;
160-
Slice &operator=(Slice<T> &&) noexcept = default;
159+
Slice &operator=(const Slice<T> &) & noexcept = default;
160+
Slice &operator=(Slice<T> &&) & noexcept = default;
161161

162162
T *data() const noexcept;
163163
std::size_t size() const noexcept;
@@ -434,7 +434,7 @@ class Box final {
434434
explicit Box(const T &);
435435
explicit Box(T &&);
436436

437-
Box &operator=(Box &&) noexcept;
437+
Box &operator=(Box &&) & noexcept;
438438

439439
const T *operator->() const noexcept;
440440
const T &operator*() const noexcept;
@@ -510,7 +510,7 @@ Box<T>::~Box() noexcept {
510510
}
511511

512512
template <typename T>
513-
Box<T> &Box<T>::operator=(Box &&other) noexcept {
513+
Box<T> &Box<T>::operator=(Box &&other) & noexcept {
514514
if (this->ptr) {
515515
this->drop();
516516
}
@@ -595,8 +595,8 @@ class Vec final {
595595
Vec(Vec &&) noexcept;
596596
~Vec() noexcept;
597597

598-
Vec &operator=(Vec &&) noexcept;
599-
Vec &operator=(const Vec &);
598+
Vec &operator=(Vec &&) & noexcept;
599+
Vec &operator=(const Vec &) &;
600600

601601
std::size_t size() const noexcept;
602602
bool empty() const noexcept;
@@ -667,17 +667,15 @@ Vec<T>::~Vec() noexcept {
667667
}
668668

669669
template <typename T>
670-
Vec<T> &Vec<T>::operator=(Vec &&other) noexcept {
671-
if (this != &other) {
672-
this->drop();
673-
this->repr = other.repr;
674-
new (&other) Vec();
675-
}
670+
Vec<T> &Vec<T>::operator=(Vec &&other) & noexcept {
671+
this->drop();
672+
this->repr = other.repr;
673+
new (&other) Vec();
676674
return *this;
677675
}
678676

679677
template <typename T>
680-
Vec<T> &Vec<T>::operator=(const Vec &other) {
678+
Vec<T> &Vec<T>::operator=(const Vec &other) & {
681679
if (this != &other) {
682680
this->drop();
683681
new (this) Vec(other);
@@ -823,8 +821,8 @@ class Error final : public std::exception {
823821
Error(Error &&) noexcept;
824822
~Error() noexcept override;
825823

826-
Error &operator=(const Error &);
827-
Error &operator=(Error &&) noexcept;
824+
Error &operator=(const Error &) &;
825+
Error &operator=(Error &&) & noexcept;
828826

829827
const char *what() const noexcept override;
830828

qt1/bridge.h

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class String final {
4646
String(const char *);
4747
String(const char *, std::size_t);
4848

49-
String &operator=(const String &) noexcept;
50-
String &operator=(String &&) noexcept;
49+
String &operator=(const String &) & noexcept;
50+
String &operator=(String &&) & noexcept;
5151

5252
explicit operator std::string() const;
5353

@@ -95,7 +95,7 @@ class Str final {
9595
Str(const char *);
9696
Str(const char *, std::size_t);
9797

98-
Str &operator=(const Str &) noexcept = default;
98+
Str &operator=(const Str &) & noexcept = default;
9999

100100
explicit operator std::string() const;
101101

@@ -141,8 +141,8 @@ template <>
141141
struct copy_assignable_if<false> {
142142
copy_assignable_if() noexcept = default;
143143
copy_assignable_if(const copy_assignable_if &) noexcept = default;
144-
copy_assignable_if &operator=(const copy_assignable_if &) noexcept = delete;
145-
copy_assignable_if &operator=(copy_assignable_if &&) noexcept = default;
144+
copy_assignable_if &operator=(const copy_assignable_if &) & noexcept = delete;
145+
copy_assignable_if &operator=(copy_assignable_if &&) & noexcept = default;
146146
};
147147
} // namespace detail
148148

@@ -155,8 +155,8 @@ class Slice final
155155
Slice() noexcept;
156156
Slice(T *, std::size_t count) noexcept;
157157

158-
Slice &operator=(const Slice<T> &) noexcept = default;
159-
Slice &operator=(Slice<T> &&) noexcept = default;
158+
Slice &operator=(const Slice<T> &) & noexcept = default;
159+
Slice &operator=(Slice<T> &&) & noexcept = default;
160160

161161
T *data() const noexcept;
162162
std::size_t size() const noexcept;
@@ -433,7 +433,7 @@ class Box final {
433433
explicit Box(const T &);
434434
explicit Box(T &&);
435435

436-
Box &operator=(Box &&) noexcept;
436+
Box &operator=(Box &&) & noexcept;
437437

438438
const T *operator->() const noexcept;
439439
const T &operator*() const noexcept;
@@ -509,7 +509,7 @@ Box<T>::~Box() noexcept {
509509
}
510510

511511
template <typename T>
512-
Box<T> &Box<T>::operator=(Box &&other) noexcept {
512+
Box<T> &Box<T>::operator=(Box &&other) & noexcept {
513513
if (this->ptr) {
514514
this->drop();
515515
}
@@ -594,8 +594,8 @@ class Vec final {
594594
Vec(Vec &&) noexcept;
595595
~Vec() noexcept;
596596

597-
Vec &operator=(Vec &&) noexcept;
598-
Vec &operator=(const Vec &);
597+
Vec &operator=(Vec &&) & noexcept;
598+
Vec &operator=(const Vec &) &;
599599

600600
std::size_t size() const noexcept;
601601
bool empty() const noexcept;
@@ -666,17 +666,15 @@ Vec<T>::~Vec() noexcept {
666666
}
667667

668668
template <typename T>
669-
Vec<T> &Vec<T>::operator=(Vec &&other) noexcept {
670-
if (this != &other) {
671-
this->drop();
672-
this->repr = other.repr;
673-
new (&other) Vec();
674-
}
669+
Vec<T> &Vec<T>::operator=(Vec &&other) & noexcept {
670+
this->drop();
671+
this->repr = other.repr;
672+
new (&other) Vec();
675673
return *this;
676674
}
677675

678676
template <typename T>
679-
Vec<T> &Vec<T>::operator=(const Vec &other) {
677+
Vec<T> &Vec<T>::operator=(const Vec &other) & {
680678
if (this != &other) {
681679
this->drop();
682680
new (this) Vec(other);

qt1/qt1.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@
6565
<LinkIncremental>false</LinkIncremental>
6666
</PropertyGroup>
6767
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
68-
<QtInstall>msvc2019_64</QtInstall>
68+
<QtInstall>6.0.1</QtInstall>
6969
<QtModules>core;gui;widgets</QtModules>
7070
</PropertyGroup>
7171
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
72-
<QtInstall>msvc2019_64</QtInstall>
72+
<QtInstall>6.0.1</QtInstall>
7373
<QtModules>core;gui;widgets</QtModules>
7474
</PropertyGroup>
7575
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">

regex_engine/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)