Opened 5 years ago

Closed 15 months 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:


this code does not compile:

struct fred{};

void ?{}(fred &, fred) = void;
fred ?=?(fred &, fred) = void;

struct superFred {

void foo() {
	superFred fred;

Change History (3)

comment:1 Changed 5 years ago by Thierry Delisle

Better test case:

struct fred{};

void  ?{}(fred & this, int count = 1);
void  ?{}(fred & this, fred & other) = void;
void ^?{}(fred & this);
fred ?=?(fred & this, const fred & other) = void;

struct superFred {
	fred f;

void foo() {
	superFred f;

comment:2 Changed 5 years ago by Rob Schluntz

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 15 months ago by Thierry Delisle

Resolution: fixed
Status: newclosed

This compiles but causes warnings. Warnings are in a different ticket : #262.

Note: See TracTickets for help on using tickets.