On 06/01/2014 09:59 AM, Philippe Sigaud via Digitalmars-d-learn wrote:
On Sun, Jun 1, 2014 at 12:34 AM, Timon Gehr via Digitalmars-d-learn
wrote:
This behaviour is independent of templates. Struct values of the same size
can be reinterpret-cast to each other this way even if their types are
co
On Sun, Jun 1, 2014 at 12:34 AM, Timon Gehr via Digitalmars-d-learn
wrote:
> This behaviour is independent of templates. Struct values of the same size
> can be reinterpret-cast to each other this way even if their types are
> completely unrelated.
Do you know if this is by design?
On Saturday, 31 May 2014 at 22:34:45 UTC, Timon Gehr wrote:
On 06/01/2014 12:25 AM, Ali Çehreli wrote:
dec10 little = cast(dec10(bingo));
You meant cast(dec10)(bingo).
assert(little == dec10("123.45"));
Is this expected behavior?
Paul
That is surprising. I've discovered that if the tem
On 06/01/2014 12:25 AM, Ali Çehreli wrote:
dec10 little = cast(dec10(bingo));
You meant cast(dec10)(bingo).
assert(little == dec10("123.45"));
Is this expected behavior?
Paul
That is surprising. I've discovered that if the template has members
that depend on a template parameter than th
On 05/31/2014 02:11 PM, Paul D Anderson wrote:
I'm working on the decimal number package for D. A decimal is a struct
with precision, max exponent and rounding mode parameters:
"Decimal!(PRECISION, MAX_EXPO, ROUNDING)". I was trying to overload the
opCast operator for this struct and I found that
I'm working on the decimal number package for D. A decimal is a
struct with precision, max exponent and rounding mode parameters:
"Decimal!(PRECISION, MAX_EXPO, ROUNDING)". I was trying to
overload the opCast operator for this struct and I found that it
does not seem necessary. I can cast decim