Calling C++ code with pointer** argument

Jesse Phillips via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 1 12:00:45 PDT 2016


On Wednesday, 1 June 2016 at 16:16:26 UTC, Kagamin wrote:
> Can you declare it as const char*const* one the C++ side?

Just to state the problem clearly, D's const is transitive, C++ 
it is not. C linkage doesn't care about const, so you can specify 
it however you want. In C++ the const is included in the 
mangling, so it must match the declaration between C++ and D.

Transitive meaning that const will apply to all elements pointed 
to. This is why you see linker complain about not being able to 
find char const * const *



More information about the Digitalmars-d-learn mailing list