It's quite a simple test, and the code just gets called from C++ and I review the stdout. What I've noticed is the print function works fine, however sse() from core.cpuid is incorrectly reporting as false. The function properly returns true if it's not called from C++ but instead a D main function. This makes me think it's related to the GC needing the main function to properly setup, however, I thought the betterC subset was supposed to negate this. While I wanted to make use of more than just cpuid/simd, this was one of the primary things I wanted to put into D code, at least for the moment. any suggestions?
Using the Standard Library with C++ Interop
wolfiesnotfine via Digitalmars-d-learn Fri, 05 Feb 2021 13:05:25 -0800
Hello, I'm currently working on a primarily C++ project but I
wanted to leverage some of D's language features and library for
a few parts. I'm using the betterC subset and here's the code
snippet in D: https://run.dlang.io/is/XOXF06
- Using the Standard Library with C++... wolfiesnotfine via Digitalmars-d-learn
- Re: Using the Standard Library... Adam D. Ruppe via Digitalmars-d-learn
- Re: Using the Standard Lib... wolfiesnotfine via Digitalmars-d-learn
- Re: Using the Standard... Bastiaan Veelo via Digitalmars-d-learn