On Tuesday, March 10, 2015 13:26:00 Ali Çehreli via Digitalmars-d-learn wrote:
On 03/10/2015 11:05 AM, Ali Çehreli wrote:
In other words, the result of the implicit conversion is an rvalue
Steven Schveighoffer says there is no rvalue in this case; an enum is a
derivative:
Thanks a lot!
Kind regards
André
On Tuesday, 10 March 2015 at 09:25:02 UTC, Meta wrote:
On Tuesday, 10 March 2015 at 08:37:46 UTC, Jonathan M Davis
wrote:
It's the base type that isn't implicitly convertible to the
enum type.
Err, yes. I had that the wrong way around. Anyway, I filed an
On 03/10/2015 01:37 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
However, the code in question still shouldn't compile because while a
Bits
variable may be implicitly convertible to ulong, it _isn't_ a ulong,
In other words, the result of the implicit conversion is an rvalue,
On 03/10/2015 11:05 AM, Ali Çehreli wrote:
In other words, the result of the implicit conversion is an rvalue
Steven Schveighoffer says there is no rvalue in this case; an enum is a
derivative:
https://issues.dlang.org/show_bug.cgi?id=14269#c14
Ali
Hi,
following coding raises a compiler error with the beta of 2.067.
Is this error intended or not?
It is working if I change first line of main to: ulong bits;
enum Bits: ulong
{
none = 0
}
bool hasBit(ref ulong rBits, ulong rBit)
{
return cast(bool)(rBits rBit);
}
void
On Tuesday, March 10, 2015 08:19:27 Meta via Digitalmars-d-learn wrote:
On Tuesday, 10 March 2015 at 07:04:48 UTC, Andre wrote:
Hi,
following coding raises a compiler error with the beta of 2.067.
Is this error intended or not?
It is working if I change first line of main to: ulong
On Tuesday, 10 March 2015 at 07:04:48 UTC, Andre wrote:
Hi,
following coding raises a compiler error with the beta of 2.067.
Is this error intended or not?
It is working if I change first line of main to: ulong bits;
enum Bits: ulong
{
none = 0
}
bool hasBit(ref ulong rBits, ulong
On Tuesday, 10 March 2015 at 08:37:46 UTC, Jonathan M Davis wrote:
It's the base type that isn't implicitly convertible to the
enum type.
Err, yes. I had that the wrong way around. Anyway, I filed an
issue.
https://issues.dlang.org/show_bug.cgi?id=14269