Opened 6 years ago
Closed 2 years ago
#92 closed defect (fixed)
Field with deleted copy constructors don't work
Reported by: | Thierry Delisle | Owned by: | |
---|---|---|---|
Priority: | major | Component: | cfa-cc |
Version: | 1.0 | Keywords: | |
Cc: |
Description
this code does not compile:
struct fred{}; void ?{}(fred &, fred) = void; fred ?=?(fred &, fred) = void; struct superFred { fred; }; void foo() { superFred fred; }
Change History (3)
comment:1 Changed 6 years ago by
comment:2 Changed 6 years ago by
I've made some progress on this. Default arguments do not add to the conversion cost anymore, so default constructing superFred works now.
Fixing the reference vs. non-reference parameter issue is proving to be trickier. I've gotten to the point where deleting the assignment or copy constructor with reference parameters successfully hides the generated functions, but there are currently issues with this approach since assertions have to match.
I started making the change to reference parameters for the generated functions, but this quickly cascades to needing to change the prelude. Since this is a big change, I want to discuss it on Wednesday.
In summary, there are still at least two issues here:
1) Assertion resolution needs to be relaxed (I believe Aaron's working on this)
2) The prelude needs non-trivial modifications
comment:3 Changed 2 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This compiles but causes warnings. Warnings are in a different ticket : #262.
Better test case: