Re: CTFE Assignment to anonymous union shows unexpected behavior

2021-04-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/22/21 6:47 PM, Rekel wrote: I'm not sure why this is happening, but after simplifying my code I traced it back to what the title may suggest. The original cause of my issues being summarized by debug print statements returning a union as: Mat([nanf, nanF, . . . .], [[1.0F, 0.0F, . . . .])

Re: CTFE Assignment to anonymous union shows unexpected behavior

2021-04-23 Thread Imperatorn via Digitalmars-d-learn
On Friday, 23 April 2021 at 10:36:40 UTC, Imperatorn wrote: On Thursday, 22 April 2021 at 22:47:17 UTC, Rekel wrote: I'm not sure why this is happening, but after simplifying my code I traced it back to what the title may suggest. The original cause of my issues being summarized by debug print

Re: CTFE Assignment to anonymous union shows unexpected behavior

2021-04-23 Thread Imperatorn via Digitalmars-d-learn
On Thursday, 22 April 2021 at 22:47:17 UTC, Rekel wrote: I'm not sure why this is happening, but after simplifying my code I traced it back to what the title may suggest. The original cause of my issues being summarized by debug print statements returning a union as: [...] Even though the

Re: CTFE Assignment to anonymous union shows unexpected behavior

2021-04-23 Thread Rekel via Digitalmars-d-learn
On Friday, 23 April 2021 at 00:55:50 UTC, H. S. Teoh wrote: [...] If you read the field during CTFE. I've never tested initializing a union in CTFE then reading it at runtime, though. Not sure exactly what would happen in that case. T I'm not referring to reading non-initial variables,

Re: CTFE Assignment to anonymous union shows unexpected behavior

2021-04-22 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Apr 22, 2021 at 11:44:51PM +, Rekel via Digitalmars-d-learn wrote: > On Thursday, 22 April 2021 at 23:41:33 UTC, H. S. Teoh wrote: > > On Thu, Apr 22, 2021 at 10:47:17PM +, Rekel via Digitalmars-d-learn > > wrote: > > > I'm not sure why this is happening, but after simplifying my

Re: CTFE Assignment to anonymous union shows unexpected behavior

2021-04-22 Thread Rekel via Digitalmars-d-learn
On Thursday, 22 April 2021 at 23:41:33 UTC, H. S. Teoh wrote: On Thu, Apr 22, 2021 at 10:47:17PM +, Rekel via Digitalmars-d-learn wrote: I'm not sure why this is happening, but after simplifying my code I traced it back to what the title may suggest. Keep in mind that CTFE does not

Re: CTFE Assignment to anonymous union shows unexpected behavior

2021-04-22 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Apr 22, 2021 at 10:47:17PM +, Rekel via Digitalmars-d-learn wrote: > I'm not sure why this is happening, but after simplifying my code I > traced it back to what the title may suggest. Keep in mind that CTFE does not support reinterpretation via unions, i.e., reading values from a

CTFE Assignment to anonymous union shows unexpected behavior

2021-04-22 Thread Rekel via Digitalmars-d-learn
I'm not sure why this is happening, but after simplifying my code I traced it back to what the title may suggest. The original cause of my issues being summarized by debug print statements returning a union as: Mat([nanf, nanF, . . . .], [[1.0F, 0.0F, . . . .]) Even though the nanF should