Opened 6 years ago

Closed 2 years ago

#115 closed defect (fixed)

No zero_t constructor for int

Reported by: a3moss Owned by:
Priority: minor Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description

int doesn't satisfy assertions like void ?{} ( T&, zero_t ); and probably should.

The Parametric Polymorphism example on the website doesn't compile as written. The workaround for this in the rational.cfa test is to define the following three user-generated constructors, but this is a hack in place since mid-2017:

void ?{}( int & this ) { this = 0; }
void ?{}( int & this, zero_t ) { this = 0; }
void ?{}( int & this, one_t ) { this = 1; }

Change History (1)

comment:1 Changed 2 years ago by Thierry Delisle

Resolution: fixed
Status: newclosed

Int now satisfy the mentioned assertion.

Note: See TracTickets for help on using tickets.