November 14, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
Of course, I forgot about deallocaion, so allocators would be defined as something like: // somewhere... | |||
November 14, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
I like the above suggestions. After thinking about it, I'm beginning to wonder if... | |||
November 14, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
Yes. | |||
November 14, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
It used to be the only way that worked. Early C compilers couldn't cope... | |||
November 14, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
Confusing.. I thought const in D meant really 'constant'. If a const in a function... | |||
November 14, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
int foo(int x)
{
static const i = x; // error, x is not const
const j... | |||
November 14, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
a static in a class is well defined. so is a const. for me 'static... | |||
November 13, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
In a function? In a class? --bb | |||
November 13, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
Does it really make sense to have the programmer decide this distinction? A global const... | |||
November 13, 2006 General » Re: auto storage class - infer or RAII? | |||
|---|---|---|---|
| |||
Hrm... so the compiler would have to do something like generate a dummy variable referencing... | |||
Copyright © 1999-2021 by the D Language Foundation