On Sunday, 26 March 2017 at 22:56:59 UTC, Jerry wrote:
On Sunday, 26 March 2017 at 22:29:56 UTC, deadalnix wrote:
It is clear that you won't be able to express 100% of C++ in D, that would require to important all the weird parts of C++ into D, but if we are doing so, why use D in the first place ?

Note that using const Class* in C++ is essentially useless. The class remains mutable and the reference is local the the callee anyway, so it doesn't change anything for the caller. Such a pattern is most likely indicative of a bug on the C++ side, or at least of code that do not do what the author intend to.


For `const Class*` the Class is not mutable. It is the case of `Class* const` that Class is mutable.

You are correct. See my first post for an explanation of this specific case.

Reply via email to