Re: C++ bindings: const(T) dropped in return types of templates ?

2021-12-09 Thread Jan via Digitalmars-d-learn
On Thursday, 9 December 2021 at 07:58:46 UTC, frame wrote: On Thursday, 9 December 2021 at 07:41:32 UTC, frame wrote: On Monday, 6 December 2021 at 20:31:47 UTC, Jan wrote: So am I missing something, or did the compiler somehow forget about the const-ness? Sounds like a bug to me, eg this

Re: C++ bindings: const(T) dropped in return types of templates ?

2021-12-09 Thread frame via Digitalmars-d-learn
On Thursday, 9 December 2021 at 07:41:32 UTC, frame wrote: On Monday, 6 December 2021 at 20:31:47 UTC, Jan wrote: So am I missing something, or did the compiler somehow forget about the const-ness? Sounds like a bug to me, eg this one: https://issues.dlang.org/show_bug.cgi?id=20685 But

Re: C++ bindings: const(T) dropped in return types of templates ?

2021-12-08 Thread frame via Digitalmars-d-learn
On Monday, 6 December 2021 at 20:31:47 UTC, Jan wrote: So am I missing something, or did the compiler somehow forget about the const-ness? Sounds like a bug to me, eg this one: https://issues.dlang.org/show_bug.cgi?id=20685

C++ bindings: const(T) dropped in return types of templates ?

2021-12-06 Thread Jan via Digitalmars-d-learn
I am trying to auto-generate bindings for C++ code in D. I've come across something that looks like a bug in DMD to me, but since I'm such a newbie in D maybe I am missing something. My C++ class looks like this: ```cpp template struct Vec3Template { static const Vec3Template ZeroVector();