const(Class) is mangled as Class const* const

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 27 17:02:45 PDT 2017


On 3/27/2017 3:30 PM, kinke wrote:
> On Monday, 27 March 2017 at 22:24:26 UTC, Walter Bright wrote:
>> On 3/27/2017 3:12 PM, kinke wrote:
>>>> It's made to work with:
>>>>
>>>>    const T
>>>>
>>>> which is the norm with C++ templates.
>>>
>>> Okay, so how exactly do I bind D code to a C++ header-only-template library? I
>>> thought that in that case you need a full D translation anyway...
>>
>> C++ templates are always header-only. I don't really understand your question.
>
> Yep, so there are no libs my D code can link to, so how am I supposed to use C++
> templates from D (as you're using that as argument for the `const T *const`
> mangling)?

There's still a miscommunication here, as header-only template libraries are not 
linked to.


More information about the Digitalmars-d mailing list