Re: Storing a lambda alongside type-erased data

2022-09-08 Thread Paul Backus via Digitalmars-d-learn
On Thursday, 8 September 2022 at 03:18:08 UTC, Ali Çehreli wrote: I looked at how std.variant.VariantN prints the correct type and failed to understand the magic there. :( Then I came up with storing a lambda that is created when the exact type is known. The following simple variant can carry

Re: Storing a lambda alongside type-erased data

2022-09-08 Thread Ali Çehreli via Digitalmars-d-learn
On 9/8/22 08:02, Paul Backus wrote: > This is actually pretty much exactly what VariantN does Great information, thanks! I am slowly getting up there. :) Ali

How to add struct definition?

2022-09-08 Thread Injeckt via Digitalmars-d-learn
I need to add this struct definition in my project. But how to do that? This structure: https://docs.microsoft.com/en-us/windows/win32/api/iptypes/ns-iptypes-ip_adapter_info

Re: How to add struct definition?

2022-09-08 Thread Paul Backus via Digitalmars-d-learn
On Friday, 9 September 2022 at 00:16:01 UTC, Injeckt wrote: I need to add this struct definition in my project. But how to do that? This structure: https://docs.microsoft.com/en-us/windows/win32/api/iptypes/ns-iptypes-ip_adapter_info import core.sys.windows.iptypes;

Re: How to add struct definition?

2022-09-08 Thread John Chapman via Digitalmars-d-learn
On Friday, 9 September 2022 at 00:16:01 UTC, Injeckt wrote: I need to add this struct definition in my project. But how to do that? This structure: https://docs.microsoft.com/en-us/windows/win32/api/iptypes/ns-iptypes-ip_adapter_info It's defined in DRuntime, so you can just import the module

Re: Storing a lambda alongside type-erased data

2022-09-08 Thread apz28 via Digitalmars-d-learn
On Thursday, 8 September 2022 at 15:02:13 UTC, Paul Backus wrote: On Thursday, 8 September 2022 at 03:18:08 UTC, Ali Çehreli wrote: I looked at how std.variant.VariantN prints the correct type and failed to understand the magic there. :( Then I came up with storing a lambda that is created whe

OpenXR library bindings etc

2022-09-08 Thread brian via Digitalmars-d-learn
I'd like to use D for some visualisation in XR, but without OpenXR, I'm stuck before I even start. I have tried before to write the library bindings (https://github.com/infinityplusb/OpenXR-D), but got stuck and honestly don't know enough about what needs doing to fix it. Apparently it is beyo