On 04/16/2012 09:27 PM, sclytrack wrote:
On 04/16/2012 08:15 PM, sclytrack wrote:
const numbers = new int[2];
const c = const(AB)(a, 20, numbers);
writeln(c);
}
Bye,
bearophile
That's exactly what I needed, thanks.
Seems to be forwarded to the constructor if there is one.
(untested code
On 04/15/2012 11:04 PM, Simon wrote:
On 15/04/2012 21:07, Trass3r wrote:
Am 15.04.2012, 21:20 Uhr, schrieb sclytrack :
this( const size_t step) const
{
this.step = step;
}
Error: cannot modify const/immutable/inout expression this.step
Is this the expected behavior? Thanks.
Yep.
No it
On Sunday, April 15, 2012 21:20:23 sclytrack wrote:
> this( const size_t step) const
> {
> this.step = step;
> }
>
>
> Error: cannot modify const/immutable/inout expression this.step
>
>
> Is this the expected behavior? Thanks.
const and immutable postblit const
On 15/04/2012 21:07, Trass3r wrote:
Am 15.04.2012, 21:20 Uhr, schrieb sclytrack :
this( const size_t step) const
{
this.step = step;
}
Error: cannot modify const/immutable/inout expression this.step
Is this the expected behavior? Thanks.
Yep.
No it's not:
import std.stdio;
struct foo
Am 15.04.2012, 21:20 Uhr, schrieb sclytrack :
this( const size_t step) const
{
this.step = step;
}
Error: cannot modify const/immutable/inout expression this.step
Is this the expected behavior? Thanks.
Yep.