Custom Query (145 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (16 - 18 of 145)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Ticket Resolution Summary Owner Reporter
#69 fixed With statement and anonymous fields Rob Schluntz <rschlunt@…> Thierry Delisle
Description

with statement does not work with anonymous fields:

struct inner { int value; };
struct outer { inner;     };

int foo(outer & this) with( this ) {
	return value;
}
#78 fixed Generic array element dereference Rob Schluntz <rschlunt@…> Thierry Delisle
Description

This code segfaults:

forall(otype T)
struct X {
	T arr[1];
};

forall(otype T)
void doit( X(T) & x, T e ) {
	x.arr[0] = e;
}

int main() {
	X(int) a;
	doit( a, 1 );
}
#80 fixed With statement and function parameters. Rob Schluntz <rschlunt@…> Thierry Delisle
Description

Users expect parameters to have priority over with statements, e.g.,

#include <fstream>

struct X {
	int value;
};

void set(X & this, int value) with(this) {
	this.value = value;
}

int main() {
	X x;
	set(x, 3);
	sout | x.value | endl;
	return 0;
}

I think the least surprising result would be that this prints 3, i.e., the parameter value has precedence over the field value.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Note: See TracQuery for help on using queries.