On Saturday, 3 January 2015 at 12:25:36 UTC, bearophile wrote:
This doesn't compile because T is const(int) so you can't
modify the arguments a and b, despite they are values:
void foo(T)(T a, T b) {
a = b;
b = a;
}
void main() {
const int x, y;
foo(x, y);
}
To make that code work I'd like to write something like this:
void foo(T)(Deconst!T a, Deconst!T b) {
Or this:
void foo(T)(@deconst T a, @deconst T b) {
Bye,
bearophile
Like Unqual!T?
