Passing D reimplementation of C++ template as argument to a C++ function
Gregor Mückl
gregormueckl at gmx.de
Mon Oct 10 04:34:59 UTC 2022
On Sunday, 25 September 2022 at 23:23:51 UTC, Nicholas Wilson
wrote:
> On Saturday, 24 September 2022 at 07:04:34 UTC, Gregor Mückl
> wrote:
> extern(C++) extern(C++, class) struct Foo(T) {
> T a, b;
> }
>
> alias FooFloat = Foo!float;
>
> extern(C++) void bar(FooFloat f);
> ```
This works when you mirror all the template arguments in the
correct order as they are part of the mangled name. Thanks!
More information about the Digitalmars-d-learn
mailing list