12
12
class issue_857 ;
13
13
14
14
15
- #line 117 "pure2-last-use.cpp2"
15
+ #line 123 "pure2-last-use.cpp2"
16
16
class issue_857_2 ;
17
17
18
18
19
- #line 122 "pure2-last-use.cpp2"
19
+ #line 128 "pure2-last-use.cpp2"
20
20
class issue_857_3 ;
21
21
22
22
23
- #line 127 "pure2-last-use.cpp2"
23
+ #line 133 "pure2-last-use.cpp2"
24
24
class issue_869 ;
25
25
26
26
27
- #line 171 "pure2-last-use.cpp2"
27
+ #line 177 "pure2-last-use.cpp2"
28
28
class cpp2_union ;
29
29
30
30
31
- #line 179 "pure2-last-use.cpp2"
31
+ #line 185 "pure2-last-use.cpp2"
32
32
class my_string ;
33
33
34
34
@@ -71,6 +71,8 @@ class issue_857 {
71
71
#line 60 "pure2-last-use.cpp2"
72
72
public: auto operator =(issue_857&& that) noexcept -> issue_857& ;
73
73
public: ~issue_857 () noexcept ;
74
+
75
+ #line 65 "pure2-last-use.cpp2"
74
76
public: auto f () && -> void;
75
77
public: auto f (issue_857&& that) && -> void;
76
78
public: auto g () && -> void;
@@ -79,6 +81,8 @@ class issue_857 {
79
81
public: auto i () && -> void;
80
82
public: auto j () && -> void;
81
83
public: auto k () && -> void;
84
+
85
+ #line 76 "pure2-last-use.cpp2"
82
86
public: auto l () && -> void;
83
87
public: auto m () && -> void;
84
88
public: static auto n ([[maybe_unused]] auto const & unnamed_param_1) -> void;
@@ -90,19 +94,19 @@ class issue_857 {
90
94
public: auto o4 () && -> void;
91
95
public: auto p0 () && -> void;
92
96
93
- #line 83 "pure2-last-use.cpp2"
97
+ #line 89 "pure2-last-use.cpp2"
94
98
public: auto p1 () && -> void;
95
99
96
- #line 87 "pure2-last-use.cpp2"
100
+ #line 93 "pure2-last-use.cpp2"
97
101
public: auto p2 () && -> void;
98
102
99
- #line 91 "pure2-last-use.cpp2"
103
+ #line 97 "pure2-last-use.cpp2"
100
104
public: auto p3 () && -> void;
101
105
102
- #line 95 "pure2-last-use.cpp2"
106
+ #line 101 "pure2-last-use.cpp2"
103
107
public: auto q () && -> void;
104
108
105
- #line 99 "pure2-last-use.cpp2"
109
+ #line 105 "pure2-last-use.cpp2"
106
110
// FIXME
107
111
// z: (move this, move that) = {
108
112
// /*f */ if true { f_copy(this); }
@@ -146,24 +150,24 @@ public: issue_869(issue_869&& that) noexcept;
146
150
public: auto operator =(issue_869 const & that) -> issue_869& ;
147
151
public: auto operator =(issue_869&& that) noexcept -> issue_869& ;
148
152
149
- #line 129 "pure2-last-use.cpp2"
153
+ #line 135 "pure2-last-use.cpp2"
150
154
};
151
155
152
156
auto issue_884_3 () -> void;
153
157
154
- #line 141 "pure2-last-use.cpp2"
158
+ #line 147 "pure2-last-use.cpp2"
155
159
auto issue_884 () -> void;
156
160
157
- #line 150 "pure2-last-use.cpp2"
161
+ #line 156 "pure2-last-use.cpp2"
158
162
auto issue_884_2 () -> void;
159
163
160
- #line 159 "pure2-last-use.cpp2"
164
+ #line 165 "pure2-last-use.cpp2"
161
165
auto issue_888 (std::string r, int size) -> void;
162
166
163
- #line 165 "pure2-last-use.cpp2"
167
+ #line 171 "pure2-last-use.cpp2"
164
168
auto draw () -> void;
165
169
166
- #line 171 "pure2-last-use.cpp2"
170
+ #line 177 "pure2-last-use.cpp2"
167
171
class cpp2_union {
168
172
public: auto destroy () & -> void;
169
173
public: ~cpp2_union () noexcept ;
@@ -172,7 +176,7 @@ class cpp2_union {
172
176
public: auto operator =(cpp2_union const &) -> void = delete ;
173
177
174
178
175
- #line 177 "pure2-last-use.cpp2"
179
+ #line 183 "pure2-last-use.cpp2"
176
180
};
177
181
178
182
class my_string {
@@ -252,15 +256,21 @@ auto f_copy([[maybe_unused]] auto ...unnamed_param_1) -> void{}
252
256
b = std::move (that).b ;
253
257
return *this ; }
254
258
#line 61 "pure2-last-use.cpp2"
255
- issue_857::~issue_857 () noexcept { f_copy (std::move (*this ).a , std::move ((*this )).b ); }
259
+ issue_857::~issue_857 () noexcept {
260
+ f_inout (a);
261
+ f_copy (std::move ((*this )).b );
262
+ }
256
263
auto issue_857::f () && -> void { f_copy (std::move ((*this ))); }
257
264
auto issue_857::f (issue_857&& that) && -> void { f_copy (std::move ((*this )), std::move (that)); }
258
265
auto issue_857::g () && -> void { f_copy (std::move ((*this )).a ); }
259
266
auto issue_857::g (issue_857&& that) && -> void { f_copy (std::move ((*this )).a , std::move (that).a ); }
260
267
auto issue_857::h () & -> void { f_inout (a); }
261
268
auto issue_857::i () && -> void { f_copy (std::move (*this ).a ); }
262
269
auto issue_857::j () && -> void { f_copy (std::move (*this ).a ); }
263
- auto issue_857::k () && -> void { f_copy (std::move (*this ).a , std::move (*this ).b ); }
270
+ auto issue_857::k () && -> void{
271
+ f_inout (a);
272
+ f_copy (std::move (*this ).b );
273
+ }
264
274
auto issue_857::l () && -> void { std::move (*this ).k (); }
265
275
auto issue_857::m () && -> void { CPP2_UFCS (k)(std::move ((*this ))); }
266
276
auto issue_857::n ([[maybe_unused]] auto const & unnamed_param_1) -> void{}
@@ -269,7 +279,7 @@ auto f_copy([[maybe_unused]] auto ...unnamed_param_1) -> void{}
269
279
auto issue_857::o1 () && -> void { CPP2_UFCS (n)(std::move ((*this ))); }
270
280
auto issue_857::o2 () && -> void { CPP2_UFCS (n)(0 ); }
271
281
auto issue_857::o3 () && -> void { std::move (*this ).n (0 ); }
272
- auto issue_857::o4 () && -> void { std::move (* this ). n (std::move ((*this ))); }
282
+ auto issue_857::o4 () && -> void { n (std::move ((*this ))); }
273
283
auto issue_857::p0 () && -> void{
274
284
f_inout (a);
275
285
f_copy (std::move ((*this )).a );
@@ -279,22 +289,22 @@ auto f_copy([[maybe_unused]] auto ...unnamed_param_1) -> void{}
279
289
f_copy (std::move (*this ).a );
280
290
}
281
291
auto issue_857::p2 () && -> void{
282
- // f_inout(a); // FIXME Moves `a`.
292
+ f_inout (a);
283
293
f_copy (std::move ((*this )));
284
294
}
285
295
auto issue_857::p3 () && -> void{
286
296
// f_inout(this); // FIXME Moves `this`.
287
297
f_copy (std::move (*this ).a );
288
298
}
289
299
auto issue_857::q () && -> void{
290
- // m (); // FIXME Moves implicit `this`.
300
+ h ();
291
301
std::move (*this ).n ();
292
302
}
293
303
294
- #line 121 "pure2-last-use.cpp2"
304
+ #line 127 "pure2-last-use.cpp2"
295
305
int gi {0 };
296
306
297
- #line 124 "pure2-last-use.cpp2"
307
+ #line 130 "pure2-last-use.cpp2"
298
308
auto issue_857_3::f () && -> void { static_cast <void >(f_inout (std::move (*this ).i )); }
299
309
300
310
@@ -335,7 +345,7 @@ issue_869::issue_869(issue_869 const& that)
335
345
if (CPP2_UFCS (is_i)(std::move (that))) {set_i (CPP2_UFCS (i)(std::move (that)));}
336
346
return *this ;
337
347
}
338
- #line 131 "pure2-last-use.cpp2"
348
+ #line 137 "pure2-last-use.cpp2"
339
349
auto issue_884_3 () -> void{
340
350
auto x {cpp2_new<int >(0 )};
341
351
if (true ) {}
@@ -376,17 +386,17 @@ auto draw() -> void{
376
386
static_cast <void >(CPP2_UFCS_MOVE (vertex)((std::move (pos))));
377
387
}
378
388
379
- #line 172 "pure2-last-use.cpp2"
389
+ #line 178 "pure2-last-use.cpp2"
380
390
auto cpp2_union::destroy () & -> void{}
381
391
cpp2_union::~cpp2_union () noexcept {
382
- // destroy(); FIXME Discarding `this` still moves it here.
392
+ destroy ();
383
393
static_cast <void >(std::move ((*this )));
384
394
}
385
395
386
- #line 184 "pure2-last-use.cpp2"
396
+ #line 190 "pure2-last-use.cpp2"
387
397
auto main (int const argc_, char ** argv_) -> int{
388
398
auto const args = cpp2::make_args (argc_, argv_);
389
- #line 185 "pure2-last-use.cpp2"
399
+ #line 191 "pure2-last-use.cpp2"
390
400
issue_683 (args);
391
401
issue_847_2 (std::vector<std::unique_ptr<int >>());
392
402
}
0 commit comments