I seem to be having some difficulty with the nan and init
properties of floating point types. Can anyone explain why the
following assertions all fail:
assert(float.init == float.nan);
assert(float.nan == float.nan);
assert(float.init == float.init);
Thanks.
Playing around with BitArray I encountered the seemingly strange
interface of
---
bool[] b = [0, 1, 0];
BitArray a;
a.init(b);
---
Is there any reason 'init' is used rather than using a
constructor?
bool[] b = [0, 1, 0];
BitArray a = BitArray(b);
Seems a bit cl
On Saturday, 4 January 2014 at 20:56:41 UTC, Adam S wrote:
I've encountered an issue using the 'with' statement. Can
anyone explain why the following requires that I explicitly
specify the variable name, even though it is within a 'with'?
class Foo {
auto test(a
I've encountered an issue using the 'with' statement. Can anyone
explain why the following requires that I explicitly specify the
variable name, even though it is within a 'with'?
class Foo {
auto test(alias val)() if (is(typeof(val) == int)){}
auto test(alias val)() if (!is(typeof(va