File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ class Compilation {
92
92
Result (bool hadAbnormalExit, int exitCode,
93
93
fine_grained_dependencies::ModuleDepGraph depGraph)
94
94
: hadAbnormalExit(hadAbnormalExit), exitCode(exitCode),
95
- depGraph (depGraph) {}
95
+ depGraph (std::move( depGraph) ) {}
96
96
97
97
Result (const Result &) = delete;
98
98
Result &operator =(const Result &) = delete ;
Original file line number Diff line number Diff line change @@ -271,6 +271,17 @@ struct ValueOwnershipKind {
271
271
272
272
explicit operator bool () const { return value != OwnershipKind::Any; }
273
273
274
+ #ifndef __cpp_impl_three_way_comparison
275
+ // C++20 (more precisely P1185) introduced more overload candidates for
276
+ // comparison operator calls. With that in place the following definitions are
277
+ // redundant and actually cause compilation errors because of ambiguity.
278
+ // P1630 explains the rationale behind introducing this backward
279
+ // incompatibility.
280
+ //
281
+ // References:
282
+ // https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1185r2.html
283
+ // https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1630r1.html
284
+
274
285
bool operator ==(ValueOwnershipKind other) const {
275
286
return value == other.value ;
276
287
}
@@ -280,6 +291,7 @@ struct ValueOwnershipKind {
280
291
281
292
bool operator ==(innerty other) const { return value == other; }
282
293
bool operator !=(innerty other) const { return !(value == other); }
294
+ #endif
283
295
284
296
// / We merge by moving down the lattice.
285
297
ValueOwnershipKind merge (ValueOwnershipKind rhs) const {
You can’t perform that action at this time.
0 commit comments